'JestElasticsearchException in jhipster

I m using JHipster 6.7.1. I made a standard installation with elasticsearch option. once Jhipser is started , while trying to search, it throws an exception:

JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"query_shard_exception","reason":"No mapping found for [id] in order to sort on","index_uuid":"Bhyc9vkhReOznQW5Py_7zA","index":"magician"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"dfs","grouped":true,"failed_shards":[{"shard":0,"index":"magician","node":"fXRR6Sn3TPqTS705SBZfDw","reason":{"type":"query_shard_exception","reason":"No mapping found for [id] in order to sort on","index_uuid":"Bhyc9vkhReOznQW5Py_7zA","index":"magician"}}]} , message : null

I only found this: https://github.com/jhipster/generator-jhipster/issues/10003

Is it related? is there a solution ?

thanks for your help!



Solution 1:[1]

The reason this is occurring is because you do not have any data in the index you are searching on. Try adding records to your jhipster project via API calls or the UI ('Create' button) and then try the search bar; jhipster automatically indexes the data during API calls. It will not, however, automatically index data that is manually loaded into the database.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cluis92