You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by swarag <Sw...@citysearch.com> on 2008/08/11 19:51:51 UTC
Lower Case Filter Factory
Hi,
I am using the basic text field in schema.xml. Here is an excerpt.
<field name="name" type="text" index="true" stored="true"
multiValued="false" omitNorms="true"/>
and the fieldType text is as follows:
<fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldtype>
When I query:
http://localhost:8983/solr/select?q=p*
I get results back, but when I query as
http://localhost:8983/solr/select?q=P*
I get no results. Is there anything wrong im doing?
Thanks,
Swarag
--
View this message in context: http://www.nabble.com/Lower-Case-Filter-Factory-tp18930459p18930459.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Lower Case Filter Factory
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Aug 11, 2008, at 1:51 PM, swarag wrote:
> When I query:
> http://localhost:8983/solr/select?q=p*
> I get results back, but when I query as
> http://localhost:8983/solr/select?q=P*
>
> I get no results. Is there anything wrong im doing?
Wildcard expressions are _not_ analyzed when parsed. Their case is
left as-is too. There is a switch to Lucene's query parser that
allows it to lowercase wildcard and fuzzy terms
(setLowercaseExpandedTerms), but unfortunately that switch is not
currently controllable from Solr.
One option is to have your querying client do the lowercasing for now.
Erik