Solr geofilt返回所有结果

时间:2016-10-03 15:33:01

标签: solr

我正在运行Solr 5.4(在Ubuntu服务器上)并从MySQL索引。它非常适合搜索和分面,但现在我想实现地理空间过滤。在我运行的管理界面中,

http://mysite:8983/solr/core/select?q=*%3A*&wt=json&indent=true&defType=edismax&spatial=true&pt=44.8859987%2C-93.0833396&sfield=org_loc&d=50

架构:

 <field name="org_loc" type="location" indexed="true" stored="true"/>
 <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>

响应:

{
    "responseHeader":{
    "status":0,
    "QTime":13,
    "params":{
        "lowercaseOperators":"true",
        "d":"50",
        "spatial":"true",
        "indent":"true",
        "q":"*:*",
        "sfield":"org_loc",
        "pt":"44.8859987,-93.0833396",
        "stopwords":"true",
        "wt":"json",
        "defType":"edismax"}},
    "response":{"numFound":21,"start":0,"docs":[
      "org_name": "..."
      "org_loc":"44.8259987,-93.0813396",
      ...etc.

问题在于它每次都会返回21条记录中的21条,而不管d。

1 个答案:

答案 0 :(得分:1)

必须使用geofilt参数明确要求

fq,此部分查询缺失:

&fq={!geofilt}
相关问题