'Data is stored in elasticsearch but not shown while access from kibana
I am using Django as a backend with Postgres database and Angular JS as a frontend. When we signup from frontend then the data stored in Elasticsearch. It is stored in Elasticsearch because counts show all signup data but it is not shown when I search in Kibana by using this command:
GET candidate/_search
Output in Kibana:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 16,
"max_score" : 1.0,
"hits" : [
{
"_index" : "candidate",
"_type" : "doc",
"_id" : "705",
"_score" : 1.0,
"_source" : {
"id" : 705,
"user" : {
"id" : 7005,
"first_name" : "brain",
"last_name" : "martine",
"email" : "[email protected]",
"employer_nm" : "A-1 hospitality",
"property_owner" : "25hours Hotel Company"
},
Here, the total count is 16, but it only shows 10 previous data which I added through Postman.
Solution 1:[1]
Elasticsearch by default fetch only the top 10 results, you can use size param to get more documents. Below example would fetch 100 documents from your index, as there are currently 16, Hence it would fetch 16.
GET candidate/_search?size=100
More info on Elasticsearch documentation
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 | Amit |

