在solr中可以实现边界查询(range query),具体已经在 http://wiki.apache.org/solr/SolrQuerySyntax 有说明
例如:
假设我的索引包含以下三个字段: title, x, y ,且每个结果集都包含 title,x,y
1. 如果想检索title字段,并且检索结果满足 10 < x < 100 ,通过solr实现:
http://localhost:8983/solr/select?q=x:[10 TO 100]&fl=title
但是如果title字段,并且检索结果满足 10 < x < 100 且 20 < y < 60,采用solr或者SolrJ就不知道怎么实现了?
求懂solr或者SolrJ的人给个解决办法 enzhaohoo@gmail.com
多谢
http://localhost:8983/solr/select?q= +x:[10 TO 100] +y:[20 TO 60]&fl=title
q= +x:[10 TO 100] +y:20 TO 60
[code="java"]http://solr.group.iteye.com/group/topic/10625[/code]相关参数参考我的文章