# Not getting Updated data from Elastic search DB

**URL:** https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686
**Category:** Elasticsearch
**Created:** [January 5, 2017, 1:50pm UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686 "2017-01-05T13:50:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![reachpratr](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@reachpratr](https://discuss.elastic.co/u/reachpratr)
#### Post date: [January 5, 2017, 1:50pm UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686/1 "2017-01-05T13:50:54Z")

</div>

HI ,

I am using below command to retrieve the data from Elasticsearch DB .

curl -XGET '[http://localhost:9200/vm\_expiry/\_search?pretty=1](http://localhost:9200/vm_expiry/_search?pretty=1)'  
Facing below issues .

1. Not getting the latest data . But in Kibana console latest data showing properly .
2. Getting incomplete output . Suppose , the above query should return 52 results , but getting only 12 . In Kibana console , getting as expected .

Please help me with a command , which I need to run in linux backend for a script , to get all latest output .

---

<div class="post-metadata">

### Author: ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)
#### Post date: [January 5, 2017, 3:03pm UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686/2 "2017-01-05T15:03:09Z")

</div>

Hard to say exactly , your not really "searching" for anything not even using wild card:

Try reading on the 2 search methods  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html)

[https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html)

Also in kibana, you can view the search it is issuing, by a little "^" in the bottom center of the graph, which will show you the actual request kibana issued.

Also not sure how your getting 12 results, the default size of returned data is 10

---

<div class="post-metadata">

### Author: ![reachpratr](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@reachpratr](https://discuss.elastic.co/u/reachpratr)
#### Post date: [January 6, 2017, 7:35am UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686/3 "2017-01-06T07:35:53Z")

</div>

Thanks for your quick response . I never expected this much quick reply . Thanks again for responding my query .  
Actually I am new to Elasticsearch . Need help on below topics  
[1.Is](http://1.Is) it possible to have the latest data only from an index .  
2. What is the command for having all the data from an index .  
3. How can I get the data of a specific date for an index .  
4. Any cheat sheet available for elasticalert commands .

Thanks .

---

<div class="post-metadata">

### Author: ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)
#### Post date: [January 6, 2017, 2:38pm UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686/4 "2017-01-06T14:38:25Z")

</div>

1. you have to define latest. No you can't say just the updated data.
2. You have to write a search that finds the data you want. And pay attention to the default settings an adjust.
3. I don't know how your loading the data or what it looks like but hopefully you inserted a timestamp field which you have to query against (like Kibana does) [https://www.elastic.co/guide/en/elasticsearch/reference/2.0/mapping-timestamp-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/mapping-timestamp-field.html)
4. I am sure some people have written some time cheat sheets but I do not know of any. The Elastic doc site is filled with examples for every thing

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 3, 2017, 2:39pm UTC](https://discuss.elastic.co/t/not-getting-updated-data-from-elastic-search-db/70686/5 "2017-02-03T14:39:00Z")

</div>

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