ElasticSearch完成建议者标准分析器不起作用 [英] ElasticSearch completion suggester Standard Analyzer not working

查看:101
本文介绍了ElasticSearch完成建议者标准分析器不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用ElasticSearch 完成建议标准分析器 ,但似乎文本未标记化.

We're using ElasticSearch completion suggester with the Standard Analyzer, but it seems like the text is not tokenized.

例如

文本:第一个示例",第二个示例"

Texts: "First Example", "Second Example"

搜索:"Fi"返回第一个示例"

Search: "Fi" returns "First Example"

搜索:"Ex"不返回任何结果,返回第一个示例"

Search: "Ex" doesn't return any result returns "First Example"

推荐答案

作为Elastic关于完成建议的文档:

As the doc of Elastic about completion suggester: Completion Suggester

完成建议者是所谓的前缀建议者.

The completion suggester is a so-called prefix suggester.

因此,当您发送关键字时,它将寻找文本的前缀.

So when you send a keyword, it will look for the prefix of your texts.

例如:

搜索:"Fi" =>第一个示例"

Search: "Fi" => "First Example"

搜索:秒" =>第二个示例"

Search: "Sec" => "Second Example"

但是如果您给Elastic提供"Ex",它将不会返回任何内容,因为它找不到以"Ex"开头的文本.

but if you give Elastic "Ex", it returns nothing because it cannot find a text which begins with "Ex".

您可以尝试其他一些建议,例如:字词提示

You can try some others suggesters like: Term Suggester

这篇关于ElasticSearch完成建议者标准分析器不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆