我已经编写了一个自定义过滤器,如果令牌包含" http"那么令牌将被替换为字符串" lucene"。
所以" http"成为" lucene"
索引后我搜索了" lucene"得到了文件,但事情是我在搜索时也得到了相同的文件" http"。你能解释一下原因吗? (我认为在索引中只有" lucene"映射文档而不是" http"。)
谢谢!
答案 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.