In solr, I want to find a single field with a negative number, for example nodeId: -1. in schema.xml, I defined it as follows: <field name = "nodeId" type = "int" indexed = "true" stored = "true" / ">
solr throws an error when using "nodeId: -1" to search as follows: org.apache.lucene.queryParser.ParseException: cannot parse "storeId: -1": encountered "-" "-" "on line 1, column 8 . One of the expected: "(" ... "*" ............... "[" ... "{" ......
I have to search with storeId: \ - 1 or storeId: "- 1" to get an answer.
Now the question is: Can I change any solr configuration files to search without any escape characters? Or another way to solve this problem without changing the Java code. Thanks.
user1058984
source share