I’m having an issue querying Solr using the following field type:
<fieldType name="text_ci" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
</analyzer>
</fieldType>
As you can see it applies the “SnowballPorterFilterFactory” when indexing and querying. If I Index something like
Mouse stuff and fun
It get’s indexed as:

As you can see the word “Mouse” is turned into “Mous” by the “SnowballPorterFilterFactory”. Which is what we want. However when we search for
Mouse*
It doesn’t seem to apply the “SnowballPorterFilterFactory” in the same way. I guess due to the * at the end.

My question is.. Is there a way to make the “SnowballPorterFilterFactory” know about wildcards? So that when i Query for
Mouse*
I don’t get 0 results.
Interestingly if i query for
mous*
The record does come back.
Or can someone offer a better way to query/index this type of field?
Thanks Dave
From the FAQ:
If you’re fine with changing your Solr source, SOLR-757 has a patch attached to it which you might find useful. I don’t know of a way to change this other than diving into the source though.
What might be a simpler idea: just have a copy field which is not stemmed. The user can search both of these fields, and then mouse* will match in the non-stemmed field.
(EDIT: actually, looking at that patch, I’m not sure it will do what you want. But basically you just need to change your query handler to stem first.)