Omri
Omri

Reputation: 915

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\")");

Upvotes: 1

Views: 368

Answers (2)

Omri
Omri

Reputation: 915

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

Upvotes: 0

sisve
sisve

Reputation: 19791

I'm unable to reproduce this. Does this still occur for you?

I'm thinking that it may be some display artifacts from the output window. Is this from the Immediate Window, the Watch Window or a call to Console.WriteLine?

Upvotes: 0

Related Questions