【发布时间】:2012-09-19 22:20:48
【问题描述】:
我们如何让 Solr 3.6.1 返回由bbox 过滤并按距离排序的地理空间搜索结果both?
我尝试按照Solr docs 中的说明将&sort=geodist() asc 附加到URL,但出现错误:
sort param could not be parsed as a query, and is not a field that exists in the index: geodist()
使用排序和 bbox 查询 URL(不工作)
http://localhost8080/solr/select?wt=json&indent=true
&q=*:*
&fl=id,latlng
&fq={!bbox%20pt=42.352455,-71.048069%20sfield=latlng%20d=5}
&sort=geodist() asc
使用排序查询 URL(作品)
http://localhost:8080/solr/select?wt=json&indent=true
&fl=id,latlng
&q=*:*
&sfield=latlng
&pt=42.352455,-71.048069
&sort=geodist()%20asc
使用 bbox 查询 URL(作品)
http://localhost8080/solr/select?wt=json&indent=true
&q=*:*
&fl=id,latlng
&fq={!bbox%20pt=42.352455,-71.048069%20sfield=latlng%20d=5}
如何让bbox 过滤并按距离对结果进行排序 (geodist())?
【问题讨论】:
标签: solr lucene gis geospatial solarium