sal*_*vob 6 twitter elasticsearch
我有一个将Twitter Stream索引到Elasticsearch中的系统。它已经运行了几个星期。
最近一个错误已经出现了,说:Limit of total fields [1000] in index [dev_tweets] has been exceeded
。
我想知道是否有人遇到过同样的问题?
另外,如果我运行此curl:
$ curl -s -XGET http://localhost:9200/dev_tweets/_mapping?pretty | grep type | wc -l
890
Run Code Online (Sandbox Code Playgroud)
它应该给我或多或少的映射中的字段数。字段很多,但不超过1000
此限制已在以下GitHub 问题中引入。
该命令count grep type | wc -l
计数文本为“ type”的行数。因此,我认为计数有可能不准确。我写了一小段文字,得到的值比实际字段数高。因此,您得到的字段数也可能少于实际数量,但是我还没有想到一种方案。
这是我做的测试。
curl -s -XGET http://localhost:9200/stackoverflow/_mapping?pretty
{
"stackoverflow" : {
"mappings" : {
"os" : {
"properties" : {
"NAME" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"TITLE" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
},
"fielddata" : true
},
"title" : {
"type" : "text",
"fielddata" : true
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
因为“类型”有5行,所以即使我只有3个字段,我的输出也还是5。
您可以尝试增加限制,看看是否可行?
PUT my_index/_settings
{
"index.mapping.total_fields.limit": 2000
}
Run Code Online (Sandbox Code Playgroud)
您还可以在创建索引期间增加此限制。
PUT my_index
{
"settings": {
"index.mapping.total_fields.limit": 2000,
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
...
}
}
Run Code Online (Sandbox Code Playgroud)
学分:https://discuss.elastic.co/t/total-fields-limit-setting/53004/2
归档时间: |
|
查看次数: |
4533 次 |
最近记录: |