开发者

Solr stop words question

开发者 https://www.devze.com 2023-01-11 17:44 出处:网络
My Solr installation is set up with the default stop words plus a few extra ones that I added. Once in a while a开发者_如何学C user types a query string that consists of all stopwords. The result is

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

Once in a while a开发者_如何学C 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消