In solr I want to search one field with negative number like nodeId:-1. in schema.xml, I defined it like this: <field name="nodeId" type="int" indexed="true" stored="true" />
solr throws error when use "nodeId:-1" to search like this: org.apache.lucene.queryParser.ParseException: Cannot parse 'storeId:-1': Encountered " "-" "- "" at line 1, column 8. Was expecting one of: "(" ... "*" ... ... ... ... ... "[" ... "{" ... ...
I must search with storeId:\-1 or storeId:"-1" to get answer.
now the question is : Can I modify any solr configration files to search without any escape characters? Or another way to resolve this problem without modify java code. Thanks.