SOLR : How to filter/not-consider search keywords like "the", "on", "in" that add no value

StackOverflow https://stackoverflow.com/questions/14755042

  •  07-03-2022
  •  | 
  •  

Вопрос

I am new to SOLR so have just got some basics right. I have configured parameters like mm, fq, qf, q etc but the problem is when a user searches like "a good italian chef in bay area", the search results (ranking) is getting affected by the presence of keywords like "a" and "in".

I know that there are some kind of settings/configuration to omit certain kind of words in SOLR but I dont know how to do that.

Thanks for help. I'm learning every day.

P.S. : I am using edismax

UPDATE :

I am searching against field information :

field name="information" type="text_general" indexed="true" stored="true"

The search is working fine but the information is getting searched for some common occurring words like "the" "and" "an" "in" etc

Это было полезно?

Решение

What you're looking for is called a "stopword list".

You'll need to specify a file of stopwords and have the StopFilterFactory in your list of filters. Details in the Solr docs.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top