【问题标题】:What exactly does the Standard tokenfilter do in Elasticsearch?标准令牌过滤器在 Elasticsearch 中究竟做了什么?
【发布时间】:2013-05-31 11:41:37
【问题描述】:

There are no examples in the documentation,我只是想知道我给它的输入会有什么期望。

【问题讨论】:

    标签: elasticsearch


    【解决方案1】:

    这是来自 Lucene 主干的 StandardFilter 源代码的摘录。它真的什么都不做。

    public final boolean incrementToken() throws IOException {
        return input.incrementToken(); // TODO: add some niceties for the new grammar
    }
    

    【讨论】:

      【解决方案2】:

      在 Elasticsearch 0.16 (Lucene 3.1) 之前,标准标记过滤器是“标准化由标准标记器提取的标记”。具体来说,它删除了首字母缩略词中单词和点末尾的's。所以,当时Apple'sC.E.O在通过标准过滤器后会变成AppleCEO。从 Elasticsearch 0.16 (Lucene 3.1) 开始,标准令牌过滤器执行nothing(至少目前如此)。它只是将令牌传递给链中的下一个过滤器。

      【讨论】:

        猜你喜欢
        • 2020-09-29
        • 2020-02-04
        • 2012-07-10
        • 1970-01-01
        • 2010-12-16
        • 1970-01-01
        • 2011-06-18
        • 2012-07-23
        • 2016-09-10
        相关资源
        最近更新 更多