solr.StopFilterFactory
This filter discards, or stops analysis of, tokens that are on the given stop words list. A standard stop words list is included in the Solr config directory, named stopwords.txt, which is appropriate for typical English language text.
https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions#FilterDescriptions-StopFilter
This filter actually remove token that are in your query, not replace with *
Example :
In: "To be or what?"
Tokenizer to Filter: "To"(1), "be"(2), "or"(3), "what"(4)
Out: "To"(1), "what"(4)
Try to use this filter.
solr.SuggestStopFilterFactory
Like Stop Filter, this filter discards, or stops analysis of, tokens that are on the given stop words list. Suggest Stop Filter differs from Stop Filter in that it will not remove the last token unless it is followed by a token separator.
You would normally use the ordinary StopFilterFactory in your index analyzer and then SuggestStopFilter in your query analyzer.
This filter will remove stop word from your query if it will not followed by token separator.
How to use:
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SuggestStopFilterFactory" ignoreCase="true" words="stopwords.txt" format="wordset"/>
</analyzer>
Example :
In: "The The"
Tokenizer to Filter: "the"(1), "the"(2)
Out: "the"(2)