user332000
user332000

Reputation: 187

Solr stop words question

My Solr installation is set up with the default stop words plus a few extra ones that I added.

Once in a while a user types a query string that consists of all stopwords. The result is that solr returns no documents at all.

What I would like to happen instead is that Solr returns all documents. Is this possible?

Frank

Upvotes: 2

Views: 2070

Answers (1)

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99750

Off the top of my head, you could fetch the stopwords in your application (e.g. http://localhost:8983/solr/admin/file/?file=stopwords.txt), and use that list to detect stopwords in your user query before sending the query to Solr. If you detect that they're all stopwords, replace with *:* to fetch all documents.

Upvotes: 5

Related Questions