Search code examples
lucenelucene.netquery-parser

Lucene query parser not parse field as expected


I want to parse a simple query using lucene (3.0.3):

title:(+return +"pink panther")

Just like in the documentation example.

The expected result is:

+title:return +title:"pink panther"

But instead i get:

+title:return +title:"itle return pink panther"

The code is very simple (c#):

Query query = 
    new QueryParser(
        Lucene.Net.Util.Version.LUCENE_30, 
        "content", 
        new Lucene.Net.Analysis.Standard.StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30))
    .Parse("title:(+return +\"pink panther\")");

Solution

  • Sorry for the trouble, the issue was a custom-modified Lucene.Net assembly...