如何在Elasticsearch中将分析器应用于特定字段

huangapple go评论60阅读模式
英文:

How can I apply analysers to a specific field in elasticsearch

问题

我有一个电影数据集,其中有一个名为"标题"的字段,现在我想使用一些搜索分析器来设置映射,我该如何做?

期望成功的搜索结果。

英文:

I have a movies dataset and It has a field named as title ,now I want to set mappings with some search analysers,how can I do that

Expecting successful search result

答案1

得分: 0

首先,您必须在使用某些分析器插入数据之前设置映射,看图像,我们已经在标题字段上创建了映射,现在我们可以批量发布电影数据(其中包含标题字段),如下所示:

英文:

so first of all you have to set your mappings before inserting data with some analyzers,

如何在Elasticsearch中将分析器应用于特定字段

look at the image, we have created a mapping on the field title,
Now we can bulk post data of movies (which has a field of title in it)

like this,
如何在Elasticsearch中将分析器应用于特定字段

huangapple
  • 本文由 发表于 2023年3月12日 09:14:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710549.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定