0

solr 范围查询的一​​些奇怪行为:

当我的 primary_longitude 范围的下限小于 -100 时,即使存在数据,solr 也不会返回任何结果。

http://localhost:8983/solr/<CORE>/select/?qt=dismax&q=Y&qf=show_all_flag&fl=*&fq=primary_longitude%3A%5B-97.500+TO+-101.999%5D&rows=25&start=0&sort=available_y+desc%2C+net_score+desc&wt=json&debugQuery=true

下面的查询应该返回上述查询返回的数据子集,所以我知道有与查询匹配的数据。

作品:

http://localhost:8983/solr/<CORE>/select/?qt=dismax&q=Y&qf=show_all_flag&fl=*&fq=primary_longitude%3A%5B-97.500+TO+-99.999%5D&rows=25&start=0&sort=available_y+desc%2C+net_score+desc&wt=json&debugQuery=true

有任何想法吗?我尝试颠倒查询 1 中数字的顺序,并返回不在该范围内的结果。

4

1 回答 1

0

Few things you can check for :-

  1. The primary_longitude field is defined as tdouble with proper precision for treating it as a number and not as a text values. (Need to see your schema.xml)
  2. The Negative numbers should probably be reversed from lower to higher [-101.999 TO -97.500]
于 2013-05-06T07:11:00.260 回答