On 4/27/07, Michael Pelz Sherman <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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


Reply via email to