Elasticsearch status is going to be red status when i add index

i use this api for check http://localhost:9200/_cluster/health?pretty
Output:
{
"cluster_name" : "elasticsearch",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 10,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 0.0
}

and i also use http://localhost:9200/_cat/shards
product 4 p UNASSIGNED
product 4 r UNASSIGNED
product 3 p UNASSIGNED
product 3 r UNASSIGNED
product 1 p UNASSIGNED
product 1 r UNASSIGNED
product 2 p UNASSIGNED
product 2 r UNASSIGNED
product 0 p UNASSIGNED
product 0 r UNASSIGNED

what should i do for healthy output.

What did you do to go to that state?

If the data is not important, then just drop the index:

DELETE product

i did the same i drop index but after that i also face same problem.

then after i uninstall elasticsearch and again install that is work for me.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.