lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anna Putnam" <a...@sendmemobile.com>
Subject RE: Case Insensitive but not Tokenized
Date Thu, 07 Jun 2007 23:03:16 GMT
Hoss,

The KeywordTokenizer and LowerCaseFilter worked great and was exactly
what I needed.

Thanks!

-----Original Message-----
From: Chris Hostetter [mailto:hossman_lucene@fucit.org] 
Sent: Wednesday, June 06, 2007 11:25 AM
To: java-user@lucene.apache.org
Subject: Re: Case Insensitive but not Tokenized


: For now, I am storing both the exact phrase (as is, for retrieval) and
: the string lower-cased (to search against) with no analyzers in the
: index.  When I search, I lower-case my query string and search against
: my lower-cased index, I give the matching exact phrase back to the
user.
: This doesn't seem like the best approach but I can't seem to make it
: work any other way.  Any suggestions?

1) if you only ever return the exact string, then you only need to store
it and you don't need to store the lowercase version
2) if you only ever want to do case-insensitive searching, you only need
to index the lowercase field, and you dont' need to index the exact
string.
3) the KeywordTokenizer along with a LowerCaseFilter should take vare of
everything you want, without needing to preprocess the input to
lowercase
it before using lucene.

-Hoss


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


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