Solr SnowballPorterFilterFactory Options and Wildcards

I had a problem with Solr request 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, "SnowballPorterFilterFactory" is applied when indexing and querying. If I specify something like

Mouse and entertainment

It is indexed as:

Index breakdown in solr

As you can see, the word "mouse" turns into "Mous" in "SnowballPorterFilterFactory". This is what we want. However, when we search

Mouse *

It doesn't seem to be like "SnowballPorterFilterFactory". I think because of * at the end.

Query Breakdown in Solr

My question is: is there a way for SnowballPorterFilterFactory to know about wildcards? So, when I query for

Mouse *

I do not get 0 results.

I wonder if I ask

mortal *

Record will return.

- / ?

Dave

+3
2

FAQ:

Lucene Wildcard, Prefix Fuzzy , , , . , "", , "" "", "", . , QueryParser . setLowercaseExpandedTerms (boolean)

Solr, SOLR-757 , . , , , .

: , . , * .

(EDIT: , , , , . , .)

+2

, , , . LowerCaseFilterFactory, Mous * .

, , , , - , , ( , ).

+2

Source: https://habr.com/ru/post/1756155/


All Articles