[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: case sensitivity
From:       "Yonik Seeley" <yonik () apache ! org>
Date:       2007-04-27 22:40:29
Message-ID: c68e39170704271540p7eb0b75cs6d77b38ade4eb52e () mail ! gmail ! com
[Download RAW message or body]

On 4/27/07, Michael Pelz Sherman <mpelzsherman@yahoo.com> wrote:
> In our experience, setting a LowercaseFilter in the query did not work; we had to \
> call setLowercaseExpandedTerms(true) to get wildcard queries to be \
> case-insensitive.

Correct, because in that case the QueryParser does not invoke analysis
(because it's a partial word, not a whole word).

> If calling setLowercaseExpandedTerms(true) is *not* in fact necessary for \
> case-insensitive wildcard queries, could you please provide an example of a solr \
> schema that can achieve this?

I didn't say that :-)

I'm saying setLowercaseExpandedTerms(true) is not sufficient for
wildcard queries in general.  If the term is indexed as "Windows95",
then a prefix query of Windows* won't find anything if
setLowercaseExpandedTerms(true)

-Yonik

> 
> Yonik Seeley <yonik@apache.org> wrote:
> On 4/26/07, Michael Kimsal wrote:
> > My colleague, after some digging, found in SolrQueryParser
> > 
> > (around line 62)
> > setLowercaseExpandedTerms(false);
> > 
> > The default for Lucene is true. Was this intentional? Or an oversight?
> 
> Waaaaaaaaay back before Solr was opensourced, and Chris was the only
> "user", I thought he needed to do prefix queries where case sensitive
> wildcard queries (hence I set it to false). I think I may have been
> mistaken about that need, but by that time, I didn't know if anyone
> depended on it, so I never changed it back.
> 
> A default of false is actually more powerful too. You can do prefix
> queries on fields that have a LowercaseFilter in their analyzer, and
> also fields that don't. If it's set to true, you can't reliably do
> prefix queries on fields that don't have a LowercaseFilter.
> 
> -Yonik
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic