lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <DCutt...@grandcentral.com>
Subject RE: Prefix query case sensitive?
Date Tue, 30 Oct 2001 22:16:39 GMT
Yes, prefix queries are indeed case sensitive.  The problem is that prefixes
do not go through an analyzer, which is where lower-casing is done.  The
reason is that if you were searching for "dogs*" you would not want "dogs"
first stemmed to "dog", since that would then match "dog*", which is not the
intended query.  A workaround for this is simply to lowercase the entire
query before passing it into the query parser.

Doug

> -----Original Message-----
> From: Paul Friedman [mailto:pfriedman@macromedia.com]
> Sent: Monday, October 29, 2001 1:18 PM
> To: 'lucene-user@jakarta.apache.org'
> Subject: Prefix query case sensitive?
> 
> 
> I am using the StandardAnalyzer for both indexing and 
> QueryParser.  If I
> index the following text:  "Massachusetts"
>  
> The following query finds the document: "mass*"
>  
> But if I use this query then the document is not found: "Mass*"
>  
> Is this the expected behavior or am I doing something wrong?
>  
> Also, what is the difference between a prefix query and 
> wildcard query?
> What is the query syntax for a wildcard query?  Does the 
> StandardAnalyzer
> support WildcardQuery?
>  
> Note:  I'm using Lucene 1.2 RC2
>  
> Thanks.
> Paul Friedman
>  
> 
> --
> To unsubscribe, e-mail:   
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:lucene-user-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message