lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Indexing/Analyzer question - case-insensitive "contains" search
Date Mon, 30 Jul 2007 15:03:58 GMT

> > It does sound very strange to me, to default to a 
> WildCardQuery! Suppose I
> > am looking for "bold", I am getting hits for "old".
> 
> I know - but that's what the requirements dictate. A better 
> example might be
> a MAC or IP address, where someone might be searching for a 
> string in the
> middle - like, I might search for "102" to get "192.168.102.151" and "
> 192.168.102.200" as results.

Yes....so you think that if you use StandardAnalyzer(), and you index a field with 192.168.102.151,
and then you use the queryparser [1] to search for "102", you do not get a hit? Lucene would
not have the status it has if it could not do this. Obviously, it depends on your analyzer
how the indexing is done exactly. 

I disencourage you to use the WildCardQuery when it is not needed.

[1] http://lucene.apache.org/java/docs/queryparsersyntax.html

Regards Ard

> 

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