I would still be interested in knowing why the combination of the StandardAnalyzer, a phrase built using double quotes with no stop words, and the QueryParser doesn't return hits while building the same query with the StadardAnalyzer and a PhraseQuery does?
Thanks, Paul -----Original Message----- From: java-user-return-45156-paul.b.murdoch=saic....@lucene.apache.org [mailto:java-user-return-45156-paul.b.murdoch=saic....@lucene.apache.org] On Behalf Of Murdoch, Paul Sent: Wednesday, February 24, 2010 5:11 PM To: java-user@lucene.apache.org Subject: RE: Phrase Search and NOT_ANALYZED PhraseQuery appears to be working. Thanks to all. Paul -----Original Message----- From: java-user-return-45155-paul.b.murdoch=saic....@lucene.apache.org [mailto:java-user-return-45155-paul.b.murdoch=saic....@lucene.apache.org] On Behalf Of Murdoch, Paul Sent: Wednesday, February 24, 2010 5:01 PM To: java-user@lucene.apache.org Subject: RE: Phrase Search and NOT_ANALYZED Thanks, I've been looking at that one too. I'm trying to make it happen with the StandardAnalyzer. Unfortunately, I think I see some redesign for more robustness in the future. Cheers, Paul -----Original Message----- From: java-user-return-45154-paul.b.murdoch=saic....@lucene.apache.org [mailto:java-user-return-45154-paul.b.murdoch=saic....@lucene.apache.org] On Behalf Of Robert Muir Sent: Wednesday, February 24, 2010 4:55 PM To: java-user@lucene.apache.org Subject: Re: Phrase Search and NOT_ANALYZED check out KeywordAnalyzer! On Wed, Feb 24, 2010 at 4:51 PM, Murdoch, Paul <paul.b.murd...@saic.com>wrote: > 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 > > -- Robert Muir rcm...@gmail.com