use*_*984 7 search solr negative-number
在solr中我想搜索一个带负数的字段,如nodeId:-1.在schema.xml中,我这样定义:<field name ="nodeId"type ="int"indexed ="true"stored ="true"/>
使用"nodeId:-1"进行搜索时solr抛出错误:org.apache.lucene.queryParser.ParseException:无法解析'storeId:-1':遇到"" - "" - ""在第1行第8列期待其中一个:"("......"*"...... ...... ......"......""......"{"......
我必须使用storeId:\ - 1或storeId:" - 1"进行搜索才能得到答案.
现在的问题是:我可以修改任何solr configration文件来搜索没有任何转义字符?或者另一种方法来解决这个问题而无需修改java代码.谢谢.