What exactly does the Standard tokenfilter do in Elasticsearch?

前端 未结 2 1548
遇见更好的自我
遇见更好的自我 2021-01-18 05:40

There are no examples in the documentation, and I was just wondering what to expect from input I give it.

相关标签:
2条回答
  • 2021-01-18 06:10

    Before Elasticsearch 0.16 (Lucene 3.1) the standard token filter was "normalizing tokens extracted by standard tokenizer". To be specific, it was removing 's at the end of words and dots in acronyms. So, back then Apple's C.E.O would become Apple CEO after passing the standard filter. Starting with Elasticsearch 0.16 (Lucene 3.1) the standard token filter does nothing (at least at the moment). It simply passes tokens to the next filter in the chain.

    0 讨论(0)
  • 2021-01-18 06:14

    Here's an excerpt of the source code of StandardFilter from Lucene trunk. It really does nothing.

    public final boolean incrementToken() throws IOException {
        return input.incrementToken(); // TODO: add some niceties for the new grammar
    }
    
    0 讨论(0)
提交回复
热议问题