Fielddata is disabled on text fields by default. Set fielddata=true on [XXX] in order to load fielddata in memory by uninverting the inverted index.
2020-12-10 15:29
2011 查看
1、报错信息:
Fielddata is disabled on text fields by default. Set fielddata=true on [
createTime] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
2、翻译如下:
默认情况下在文本字段中禁用 Fielddata。在字段 [
createTime] 上设置 fielddata=true,以便通过不反转反转索引将 fielddata 加载到内存中。注意,这可能会使用大量内存,或者使用关键字 [keyWord] 字段代替。
3、报错原因:
ElasticSearch 5.x 版本之后将 String 类型去掉了,以 text 和 keyWord 代替。
官方解释如下:https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html
4、如何解决:
PUT 你的index/_mapping/你的type/
{
"properties": {
"你的字段": {
"type": "text或keyWord",
"fielddata": true
}
}
}
修改报错中提到的字段类型,修改为 text 或 keyWord。以 createTime 字段为例:
PUT 我的index/_mapping/我的type/
{
"properties": {
"createTime": {
"type": "text",
"fielddata": true
}
}
}
相关文章推荐
- 聚合操作错误:Fielddata is disabled on text fields by default. Set fielddata=true
- ElasticSearch fielddata is disabled on text fields by default. set fielddata=true on interests
- java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=t
- Elasticsearch API 统计出错(Fielddata is disabled on text fields by default.)
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- (转)es进行聚合操作时提示Fielddata is disabled on text fields by default
- Elasticsearch5.X进行聚合操作时提示Fielddata is disabled on text fields by default
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- Fielddata is disabled on text fields by default(keyword 可避免错误)
- es进行聚合操作时提示Fielddata is disabled on text fields by default
- How to set the default input focus on a field in an HTML web form
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error
- #Redis Error #MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details a
- How to grant access to SQL logins on a standby database when the guest user is disabled in SQL Serve
- MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error
- 忘记导入struts2-xxx-plugin-x.x.x.jar导致服务器启动报Unable to load configuration.Caused by: Parent package is not defined: xxx-default
- vs2005下出现“Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive”的解决方法
- Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive
- Failed to load http://localhost:8080/team.php: Request header field x-jwt-header is not allowed by Access-Control-Allow-Headers in preflight response.
- 排错Package restore is disabled by default. To give consent, open the Visual Studio Options dialog