lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Use of Field(String name, TokenStream tokenStream)
Date Sun, 07 Oct 2007 22:07:10 GMT

: I am observing that a Field constructed using tokenStream i.e Filed fl  =
: new Field(String name, TokenStream tokenStream)  is not converted to the
: lower case when stored in the index.
: The terms in the index are exactly same as those in tokenStream.
: When I do a phrase search,the  PhraseQuery converts the search string to
: all lower case , however it does not find any hits in the index because in

if this is the case, then it is because the Analyzer used by your 
QueryParser is lowercasing the tokens.  when you use the Field constructor 
that takes a TokenStream, all of the analysis for the source text should 
have alreayd been done -- if not, then use one of the other constructors 
and let the Analyser do it's thing when you add the document to your 
index.



-Hoss


---------------------------------------------------------------------
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