Solr range request errors

http: // localhost: 8983 / solr / select? wt = json & q = lat: [35% 20to% 2038] leads to

org.apache.lucene.queryParser.ParseException: Cannot parse 'lat:[35 to 38]': Encountered " <RANGEIN_GOOP> "38 "" at line 1, column 11. Was expecting: "]" 

This is a fairly simple range query, and this error will not allow us to use SOLR for our projects.

+6
solr
source share
3 answers

Try "TO" in uppercase.

+18
source share

Switch by default to use smax instead of lucene parser.

0
source share
 /_search?q=lat:[35 TO 38] or /_search?q=lat:[35%20TO%2038] 

It works and is being tested.

 https://search-xxxx-scyleqdxxxxx57yi4m.us-east-2.es.amazonaws.com/id/_search?q=id:2017-10-28&size=100 https://search-xxxx-scyleqdxxxxx57yi4m.us-east-2.es.amazonaws.com/id/_search?q=v:[0%20TO%20100]&size=100 https://search-xxxx-scyleqdxxxxx57yi4m.us-east-2.es.amazonaws.com/id/_search?q=id:[2017-10-26%20TO%202017-10-27]&size=100 
0
source share

All Articles