Hey, I have this error:
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [@timestamp] in order to sort on","index_uuid":"0qKrRe3tQbKYhi5ps_WcCw","index":"products"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"can_match","grouped":true,"failed_shards":[{"shard":0,"index":"products","node":"asmTRFlgThS7kBU6yyCJzA","reason":{"type":"query_shard_exception","reason":"No mapping found for [@timestamp] in order to sort on","index_uuid":"0qKrRe3tQbKYhi5ps_WcCw","index":"products"}}]},"status":400}
So what's wrong?
PUT /products
{
"settings": {
"number_of_replicas": 2,
"number_of_shards": 2
}
}
that's my products index:
POST /products/_doc
{
"name": "Coffee Maker",
"price": 64
}
POST /products/_doc
{
"name": "Ice Tea",
"price": 50
}
POST /products/_doc
{
"name": "products",
"price": 10
}