Add new analyzer for speed match_phrase query #1054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
medcl 你好,对于ES 的text 类型字段主要使用方式有match 和 match_phrase 两种,前者仅仅是匹配查询,后者则需要命中 terms 之间的相对 position也要和query 的中的terms 的相对位置一样。对于细粒度分词,如果有标准确定这些分词的position就可以在细粒度分词字段上使用match_phrase 。 为此新加了两个分词器,他们分别是通过首字和尾字的position确定本分词结果的 position ; 分词结果对match query 无影响,经测试在match_phrase query 上比使用 standard 分词查询时间能下降 95% 以上。