7

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

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 pretty basic range query and this error will prevent us from using SOLR for our projects

3 Answers 3

22

Try 'TO' in upper-case.

Sign up to request clarification or add additional context in comments.

3 Comments

You're right. lowercase 'to' appears to work, but 'TO' works as it should.
yup, it has to be upper-case
correct it has to uppercase and all fields of table are case sensitive. Also do not forget to keep expression inside quote ' '
0

Switched default to use dismax instead of lucene parser.

Comments

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

Working & Tested the same.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.