这是一个Lucene(4.1.0)错误还是用户错误,我假设错误,因为用户coe只是将搜索传递给Lucene,但我无法在JIRA中找到任何内容
java.lang.NullPointerException
at java.util.TreeMap.getEntry(TreeMap.java:342)
at java.util.TreeMap.get(TreeMap.java:273)
at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsReader.terms(PerFieldPostingsFormat.java:215)
at org.apache.lucene.search.TermCollectingRewrite.collectTerms(TermCollectingRewrite.java:58)
at org.apache.lucene.search.ConstantScoreAutoRewrite.rewrite(ConstantScoreAutoRewrite.java:95)
at org.apache.lucene.search.MultiTermQuery$ConstantScoreAutoRewrite.rewrite(MultiTermQuery.java:220)
at org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:286)
at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:429)
at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:616)
at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:663)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
at org.musicbrainz.search.servlet.AbstractSearchServer.search(AbstractSearchServer.java:190)
at org.musicbrainz.search.servlet.AbstractSearchServer.search(AbstractSearchServer.java:172)
at org.musicbrainz.search.servlet.SearchServerServlet.doSearch(SearchServerServlet.java:616)
at org.musicbrainz.search.servlet.SearchServerServlet.doGet(SearchServerServlet.java:551)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
答案 0 :(得分:0)
该问题是由用户构建无效查询引起的,该查询没有考虑到' /'现在用于正则表达式,这个查询应该被MultiFieldQueryParser.parse()拒绝但不会,这会在实际尝试运行查询时导致NullPointerException
提出问题