【发布时间】:2020-09-14 16:19:41
【问题描述】:
我使用默认分析器“英语”来搜索文档,它非常好。 但是,当搜索查询拼写错误或按此类拼写错误的短语进行搜索时,我还需要“您的意思是”结果。
我需要什么分析器/过滤器/查询来实现这样的行为?
原文
Elasticsearch is a distributed, open source search and analytics engine for all types of data,
including textual, numerical, geospatial, structured, and unstructured. Elasticsearch is built
on Apache Lucene and was first released in 2010 by Elasticsearch N.V. (now known as Elastic).
Known for its simple REST APIs, distributed nature, speed, and scalability, Elasticsearch is
the central component of the Elastic Stack, a set of open source tools for data ingestion,
enrichment, storage, analysis, and visualization. Commonly referred to as the ELK Stack
(after Elasticsearch, Logstash, and Kibana), the Elastic Stack now includes a rich collection
of lightweight shipping agents known as Beats for sending data to Elasticsearch.
搜索字词
搜索查询 => 你的意思是 XXX 吗?
遗漏的字母或类似的东西
Elastisearch => Elastic搜索
distribated => 分布式
亚太地区je => Apache
额外空间
弹性搜索 => 弹性搜索
没有空格
开源 => 开源
拼写错误的短语
serach engne => 搜索引擎
【问题讨论】:
-
不错的问题+1,但如果您能解释更多关于您的用例,那就太好了,有些很容易在一个查询中实现,有些则不是,所以您可能必须使用多个 ES 查询才能获得预期结果
-
一般用例只有一个:为用户提供一些纠正拼写错误的方法,但正如我所描述的,拼写错误可能相当复杂。可以为不同的变体使用一些索引/查询,因为我可以在之后组合结果。我已经添加了另一个案例来质疑 - 信中的错误。我需要开始:一些指向此案例的文档/示例的指针。
标签: elasticsearch nest elasticsearch-analyzers