Hello Lucene.NET team,

We've started upgrading to the Lucene.NET 4.8 beta 4 and encountered a bug in the QueryParser class.
Below is a code sample illustrating how to reproduce the issue:

            var analyzer = new StandardAnalyzer(LuceneVersion.LUCENE_48);
            var query = "+FieldName:Value_0";
            var parser = new QueryParser(LuceneVersion.LUCENE_48, "FieldName", new EnRuAnalyzer());
            var res = parser.Parse(query);

Result query is different in 3.0.3 and 4.8 versions:

Lucene 3.0.3
+FieldName:"(value valu) 0"

Lucene 4.8 beta 4
+((FieldName:value FieldName:valu) FieldName:0)

So if we have a document with FieldName == "0" (without the word "value"), it would be found with Lucene 4.8 anyway.
Please let me know if any additional information is needed.

Best regards,
Khindikaynen Aleksey
  • QueryParser bug Алексей Хиндикайнен

Reply via email to