Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new analyzer for speed match_phrase query #1054

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

muhao1020
Copy link

medcl 你好,对于ES 的text 类型字段主要使用方式有match 和 match_phrase 两种,前者仅仅是匹配查询,后者则需要命中 terms 之间的相对 position也要和query 的中的terms 的相对位置一样。对于细粒度分词,如果有标准确定这些分词的position就可以在细粒度分词字段上使用match_phrase 。 为此新加了两个分词器,他们分别是通过首字和尾字的position确定本分词结果的 position ; 分词结果对match query 无影响,经测试在match_phrase query 上比使用 standard 分词查询时间能下降 95% 以上。

@medcl medcl changed the title å¢add new analyzer for speed match_phrase query Add new analyzer for speed match_phrase query Apr 21, 2024
@medcl
Copy link
Member

medcl commented Apr 24, 2024

分词这块可以提供一些单元测试的补充么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants