Привет! Я выполняю запрос curl к экземпляру поиска elasti c. Однако я получаю сообщение об ошибке, как показано ниже.
curl -X GET "localhost:57457/mep-reports*/_search?pretty&size=0" -H 'Content-Type: application/json' --data-binary @query.txt
Response.
{
"error" : {
"root_cause" : [
{
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [status] 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."
}
],
"type" : "search_phase_execution_exception",
"reason" : "all shards failed",
"phase" : "query",
"grouped" : true,
"failed_shards" : [
{
"shard" : 0,
"index" : "mep-reports",
"node" : "NJuAFq3YSni4TIK9PzgJxg",
"reason" : {
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [status] 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."
}
}
],
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [status] 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.",
"caused_by" : {
"type" : "illegal_argument_exception",
"reason" : "Fielddata is disabled on text fields by default. Set fielddata=true on [status] 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."
}
}
},
"status" : 400
}
Любая идея, как это исправить. Вот мое определение картографии, которое я получил
curl-XGET"localhost:57457/mep-reports*/_mapping/field/*?pretty"
{
"mep-reports":{
"mappings":{
"doc":{
"_index":{
"full_name":"_index",
"mapping":{
}
},
"status.keyword":{
"full_name":"status.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"inventory":{
"full_name":"inventory",
"mapping":{
"inventory":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"flight_name.keyword":{
"full_name":"flight_name.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"nof_segments":{
"full_name":"nof_segments",
"mapping":{
"nof_segments":{
"type":"long"
}
}
},
"_all":{
"full_name":"_all",
"mapping":{
}
},
"_ignored":{
"full_name":"_ignored",
"mapping":{
}
},
"campaign_name":{
"full_name":"campaign_name",
"mapping":{
"campaign_name":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"_parent":{
"full_name":"_parent",
"mapping":{
}
},
"flight_id.keyword":{
"full_name":"flight_id.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"flight_name":{
"full_name":"flight_name",
"mapping":{
"flight_name":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"@version":{
"full_name":"@version",
"mapping":{
"@version":{
"type":"long"
}
}
},
"_version":{
"full_name":"_version",
"mapping":{
}
},
"campaign_id":{
"full_name":"campaign_id",
"mapping":{
"campaign_id":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"_routing":{
"full_name":"_routing",
"mapping":{
}
},
"_type":{
"full_name":"_type",
"mapping":{
}
},
"msg_text":{
"full_name":"msg_text",
"mapping":{
"msg_text":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"delivery_ts":{
"full_name":"delivery_ts",
"mapping":{
"delivery_ts":{
"type":"long"
}
}
},
"sender.keyword":{
"full_name":"sender.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"submission_ts":{
"full_name":"submission_ts",
"mapping":{
"submission_ts":{
"type":"long"
}
}
},
"flight_id":{
"full_name":"flight_id",
"mapping":{
"flight_id":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"_seq_no":{
"full_name":"_seq_no",
"mapping":{
}
},
"@timestamp":{
"full_name":"@timestamp",
"mapping":{
"@timestamp":{
"type":"date"
}
}
},
"account_id":{
"full_name":"account_id",
"mapping":{
"account_id":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"_field_names":{
"full_name":"_field_names",
"mapping":{
}
},
"sender":{
"full_name":"sender",
"mapping":{
"sender":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"recipient":{
"full_name":"recipient",
"mapping":{
"recipient":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"account_id.keyword":{
"full_name":"account_id.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"_source":{
"full_name":"_source",
"mapping":{
}
},
"_id":{
"full_name":"_id",
"mapping":{
}
},
"campaign_name.keyword":{
"full_name":"campaign_name.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"_uid":{
"full_name":"_uid",
"mapping":{
}
},
"recipient.keyword":{
"full_name":"recipient.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"inventory.keyword":{
"full_name":"inventory.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"msg_text.keyword":{
"full_name":"msg_text.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
},
"status":{
"full_name":"status",
"mapping":{
"status":{
"type":"text",
"fields":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
},
"campaign_id.keyword":{
"full_name":"campaign_id.keyword",
"mapping":{
"keyword":{
"type":"keyword",
"ignore_above":256
}
}
}
}
}
}
}
очень ценю, если вы можете помочь.