It still happens if there are no stop words in the fieldValue. For
instance if fieldValue was "paul murdoch", Luke would show the query as
name:"paul murdoch" but no hits are returned.  If I change to
Field.Index.ANALYZED it works.  The problem with ANALYZED is that there
is a possibility of picking up false positive hits.  With queries
like...

name:murdoch    // assume "murdoch" is another separate field value

Obviously here I just want "murdoch" but since "paul murdoch" was
indexed ANALYZED that will be returned as well.  Using quotes with
Field.Index.NOT_ANALYZED isn't working for me. I'm thinking maybe it's
the QueryParser so I'm going trying a PhraseQuery instead.

Thanks,

Paul 


-----Original Message-----
From: java-user-return-45149-paul.b.murdoch=saic....@lucene.apache.org
[mailto:java-user-return-45149-paul.b.murdoch=saic....@lucene.apache.org
] On Behalf Of Erick Erickson
Sent: Wednesday, February 24, 2010 4:23 PM
To: java-user@lucene.apache.org
Subject: Re: Phrase Search and NOT_ANALYZED

What does Luke's explain show you? That'll show you a lot about how
the query gets transformed......

My first guess is that stop words are messing you up....

Erick

On Wed, Feb 24, 2010 at 3:51 PM, Murdoch, Paul
<paul.b.murd...@saic.com>wrote:

> Hi,
>
>
>
> I'm indexing a field using the StandardAnalyzer 2.9.
>
>
>
> field = new Field(fieldName, fieldValue, Field.Store.YES,
> Field.Index.NOT_ANALYZED);
>
>
>
> Let's say fieldName is "name" and fieldValue is "something in the
> index".  When I perform the query...
>
>
>
> name:"something in the index"
>
>
>
> ... I don't get a hit.  I'm using the StandardAnalyzer for searching.
> I've tested this with Luke and it doesn't work there either.  What am
I
> missing?
>
>
>
> Thanks,
>
>
>
> Paul
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to