It still fails even when there are no stop words. I'm going to try a PhraseQuery instead of relying on the QueryParser.
Regards, Paul -----Original Message----- From: [email protected] [mailto:[email protected] ] On Behalf Of Digy Sent: Wednesday, February 24, 2010 4:45 PM To: [email protected] Subject: RE: Phrase Search and NOT_ANALYZED Since it is not analyzed, your text is stored as a single term in the index [something in the index]. But the query name:"something in the index" is translated as : find 4 consecutive terms which have values "something", "in","the" and "index" respectively. or if stop words are removed find 2 consecutive terms which have values "something" and "index" You should either index it ANALYZED or use TermQuery while searching. DIGY -----Original Message----- From: Murdoch, Paul [mailto:[email protected]] Sent: Wednesday, February 24, 2010 10:51 PM To: [email protected] Subject: Phrase Search and NOT_ANALYZED 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: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
