Thanks Jon.
My initial thought was exactly like yours. My preference was to implement
this requirement completely at Solr level so that different applications
won't have to put this logic. However, I am not sure how to shingle-ize the
input query and use that in filter query with a NOT operator
Hi,
We have a requirement to NOT display search results if user query contains
terms that are in our anti-words field. For example, if user query is I
have swollen foot and if some records in our index have swollen foot in
anti-words field, we don't want to display those records. How do I go
This is tricky. You could try doing something with the ShingleFilter
(http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory)
at _query time_ to turn the users query:
i have a swollen foot into:
i, i have, i have a, i have a swollen, have, have a,
have a