I am getting empty results while searching for the frontend. Got the below error in log file.
main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position~asc] in order to sort on","index_uuid":"rJsF6r3yS5OPrTn7iUcIkg","index":"tc_dev_product_1_v2"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"tc_dev_product_1_v2","node":"kA6-CxIIQ_KGdGAKF5mgGA","reason":{"type":"query_shard_exception","reason":"No mapping found for [position~asc] in order to sort on","index_uuid":"rJsF6r3yS5OPrTn7iUcIkg","index":"tc_dev_product_1_v2"}}]},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [position~asc] in order to sort on","index_uuid":"rJsF6r3yS5OPrTn7iUcIkg","index":"tc_dev_product_1_v2"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"tc_dev_product_1_v2","node":"kA6-CxIIQ_KGdGAKF5mgGA","reason":{"type":"query_shard_exception","reason":"No mapping found for [position~asc] in order to sort on","index_uuid":"rJsF6r3yS5OPrTn7iUcIkg","index":"tc_dev_product_1_v2"}}]},"status":400} at /var/app/current/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:636)"}
I checked the below commands in the elastic search server and got like this,
Command : curl http://localhost:9200/index/_mapping?pretty
Output : {
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "index",
"index_uuid" : "na",
"index" : "index"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "index",
"index_uuid" : "na",
"index" : "index"
},
"status" : 404
}
Elastic suite server verison : 6.8.5
What could be the issue? Can someone please help to solve this issue. Thanks in advance.