这是 Lucene 4.1 中已知的 PerFieldPostingsFormat 错误还是这个用户错误

Is this known PerFieldPostingsFormat bug in Lucene 4.1 or is this user error

这是 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) 

问题是由于用户构造了一个无效查询引起的,该查询没有考虑到“/”现在用于正则表达式,这个查询应该被 MultiFieldQueryParser.parse() 拒绝,但没有,当实际尝试 运行 查询

时,这会导致 NullPointerException

已提出问题

https://issues.apache.org/jira/browse/LUCENE-6347