lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Digy" <digyd...@gmail.com>
Subject RE: Phrase Search and NOT_ANALYZED
Date Wed, 24 Feb 2010 21:45:14 GMT
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:PAUL.B.MURDOCH@saic.com] 
Sent: Wednesday, February 24, 2010 10:51 PM
To: java-user@lucene.apache.org
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message