lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Алексей Хиндикайнен <>
Subject QueryParser bug
Date Wed, 11 Oct 2017 09:56:27 GMT
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

View raw message