Reputation: 641
I'm new working with Solr and I have an instance running properly in my server
My problem is:
When I query Solr with some terms it doesn't return results, but there are items with that term indexed. I talked with a developer who was working with this Solr instance and he remember something about a "blacklist", or "empty list", or something related, that act as a filter for queries, it's like a common words list that return poor quality results to a query, words like: "a", "the", "for", ...
I want to know how to manage that list to remove a term from it(or add one, edit, etc)
Upvotes: 0
Views: 882
Reputation: 1242
It sounds like you're talking about the stopwords filter. If you have stopword filtering active, you should see something similar to this in your field analysis within schema.xml
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt" enablePositionIncrements="true" />
This references the file stopwords.txt
, which is a standard name for this file, but a different file name may be used, so it could be different on your server. This file will contain a list of words that should be disregarded during search. You should find this file in the conf
directory for your index (the same place as the schema.xml
and solrconfig.xml
). You can edit this file, though for best results, you should re-index your records after you do so.
Alternately, if you would prefer not to filter common words from your search, you can remove the reference to the StopFilterFactory
from your field analysis entirely. Again, you should plan to reindex your records after doing so.
Upvotes: 1