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.
精彩评论