我需要从MySQL在Apache-Solr中执行自连接。
举个例子:
select t2.city from table_name t1,table_name t2 where t1.city ='abc' and t1.company='def' and t1.name=t2.name and t2.company='xyz';发布于 2016-12-19 18:20:32
因为不需要来自t1的任何值,所以您应该能够使用Join Query Parser来完成此操作
q={!join from=name to=name}city:abc AND company:def
fq=company:xyz生成的文档应该是上面示例中表示为t2的条目。
https://stackoverflow.com/questions/41218109
复制相似问题