1

Stopwords are working fine for german terms like 'dieser' or 'ihren', I get no search results for them. But for english terms like 'those' or 'with' stopwords are not working, I get search results. Because I'am indexing german and english documents I would like them both to work.

I am working with drupal 9 and Search API Solr(solr 8.11). In conf folder is : stopwords_en.txt and stopwords_de.txt The schema.xml has two solr.TextField fieldType elements. None of them defines a <filter> element for stopwords( I didn't change the schema.xml ).


    <fieldType name="text_ws" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
      </analyzer>
    </fieldType>

    <fieldType name="boost_term_payload" stored="false" indexed="true" class="solr.TextField" >
      <analyzer>
        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
        <filter class="solr.LengthFilterFactory" min="2" max="100"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        <filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
      </analyzer>
    </fieldType>

I already tried to define a filter with stopwords without scuccess. But why is it working for german if no filter is defined in schema.xml?

okoeller
  • 11
  • 2
  • Different kind of fields use different stop words files, on a default Solr installation `text_en` fields use file `stopwords_en.txt` whereas `text_de` fields use file `stopwords_de.txt`. You might have to also reindex your data for stop words to be considered (i.e. dropped from the indexed data). I don't think `text_ws` uses stop words, could it be that your application is using a different field for searching? – Hector Correa Mar 24 '22 at 18:13
  • Thanks for that hint, and good question. `text_ws` seems not to be used. Maybe I can figure this out in solr admin. I am new to this solr search. – okoeller Mar 30 '22 at 07:29

0 Answers0