solr:索引时过滤

时间:2016-02-12 10:02:09

标签: indexing solr filter lucene

我已经编写了一个自定义过滤器,如果令牌包含" http"那么令牌将被替换为字符串" lucene"。

check schema

所以" http"成为" lucene"

索引后我搜索了" lucene"得到了文件,但事情是我在搜索时也得到了相同的文件" http"。

check Analysis

你能解释一下原因吗? (我认为在索引中只有" lucene"映射文档而不是" http"。)

谢谢!

1 个答案:

答案 0 :(得分:0)

Have you reindexed / cleaned the index after changing the analysis chain? The analysis example doesn't show a hit for any of the tokens.

Remember that the tokens stored doesn't change unless you reindex the content, even if you change the analysis chain.