弹性搜索中的存储字段 [英] Stored field in elastic search

查看:22
本文介绍了弹性搜索中的存储字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在文档中,某些类型,例如数字和日期,它指定 store 默认为 no.但是仍然可以从json中检索该字段.

In the documentation, some types, such as numbers and dates, it specifies that store defaults to no. But that the field can still be retrieved from the json.

令人困惑.这是否意味着_source?

Its confusing. Does this mean _source?

有没有办法根本不存储字段,而只对其进行索引和搜索?

Is there a way to not store a field at all, and just have it indexed and searchable?

推荐答案

默认情况下不存储任何字段类型.只有 _source 字段是.这意味着您可以随时取回发送给搜索引擎的内容.即使您要求特定字段,elasticsearch 也会为您解析 _source 字段并将这些字段返回给您.

None of the field types are stored by default. Only the _source field is. That means you can always get back what you sent to the search engine. Even if you ask for specific fields, elasticsearch is going to parse the _source field for you and give you back those fields.

如果需要,您可以禁用 _source,但之后您只能根据您的映射检索您显式存储的字段.

You can disable the _source if you want but then you could only retrieve the fields that you explicitly stored, according to your mapping.

这篇关于弹性搜索中的存储字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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