profanity filteration in solr

2019-07-31 11:43发布

I am servering some webdata to my site using apache solr 4.10.3. I have to block profanity.

How do I block profanity in search?

I have some confusion about this filter deployment also.

Should I apply filter for profanity at document indexing time or document search time?

标签: solr lucene
1条回答
做自己的国王
2楼-- · 2019-07-31 12:20

You have 2 possibilities :

  1. Don't send the document to Solr in the first place (filter it in your code)
  2. Implement a custom UpdateRequestProcessor : https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors
查看更多
登录 后发表回答