# Index not refreshed. Query count result not accurate

**URL:** <https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081>\
**Category:** Elasticsearch\
**Created:** [May 22, 2013, 7:43pm UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081 "2013-05-22T19:43:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![garcimouche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/garcimouche/32/2297_2.png) [@garcimouche](https://discuss.elastic.co/u/garcimouche)\
**Post date:** [May 22, 2013, 7:43pm UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/1 "2013-05-22T19:43:56Z")

</div>

If anybody can shed a light on the following strange behavior:  
My index is updated every minute using a bulk processor with tens of  
documents per cycle. After 40 cycles or so, I noticed that my query doesn't  
count the new added documents (I'm using a simple HTTP GET req with the  
\_search endpoint). It is stuck with the same count of documents until I run  
an optimize on the index. The optimization seems to "refresh" the index and  
then my query count is accurate again.... until the next cycle kicks in and  
then I have to optimize the index again to see the latest docs counted in.  
I also noticed that if I query a specific document using its \_id in the  
HTTP GET request, then ES returns me the document details without having to  
use optimize.  
I currently using v 0.20.6 with a single shard no replica.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 22, 2013, 8:54pm UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/2 "2013-05-22T20:54:13Z")

</div>

Did you somehow disable refresh (-1 value)?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 22 mai 2013 à 21:43, Franck [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :

## If anybody can shed a light on the following strange behavior: My index is updated every minute using a bulk processor with tens of documents per cycle. After 40 cycles or so, I noticed that my query doesn't count the new added documents (I'm using a simple HTTP GET req with the \_search endpoint). It is stuck with the same count of documents until I run an optimize on the index. The optimization seems to "refresh" the index and then my query count is accurate again.... until the next cycle kicks in and then I have to optimize the index again to see the latest docs counted in. I also noticed that if I query a specific document using its \_id in the HTTP GET request, then ES returns me the document details without having to use optimize. I currently using v 0.20.6 with a single shard no replica.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![garcimouche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/garcimouche/32/2297_2.png) [@garcimouche](https://discuss.elastic.co/u/garcimouche)\
**Post date:** [May 23, 2013, 10:40am UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/3 "2013-05-23T10:40:48Z")

</div>

No I left the default value (1s). BTW I saw your DEVOXX presentation on ES  
that inspired me a lot! Thanks for that.

On Wed, May 22, 2013 at 4:54 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Did you somehow disable refresh (-1 value)?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 22 mai 2013 à 21:43, Franck [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> 
> If anybody can shed a light on the following strange behavior:  
> My index is updated every minute using a bulk processor with tens of  
> documents per cycle. After 40 cycles or so, I noticed that my query doesn't  
> count the new added documents (I'm using a simple HTTP GET req with the  
> \_search endpoint). It is stuck with the same count of documents until I run  
> an optimize on the index. The optimization seems to "refresh" the index and  
> then my query count is accurate again.... until the next cycle kicks in and  
> then I have to optimize the index again to see the latest docs counted in.  
> I also noticed that if I query a specific document using its \_id in the  
> HTTP GET request, then ES returns me the document details without having to  
> use optimize.  
> I currently using v 0.20.6 with a single shard no replica.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US)  
> .  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Franck

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 23, 2013, 10:54am UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/4 "2013-05-23T10:54:19Z")

</div>

Out of topic: Cool! Was that this year or last year?  
About refresh issue, I don't understand how this can happen. Can you print your elasticsearch settings?

curl -XGET '[http://localhost:9200/\_nodes/settings?pretty](http://localhost:9200/_nodes/settings?pretty)'

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 23 mai 2013 à 12:40, Franck Garcia [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :

> No I left the default value (1s). BTW I saw your DEVOXX presentation on ES that inspired me a lot! Thanks for that.
> 
> On Wed, May 22, 2013 at 4:54 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> Did you somehow disable refresh (-1 value)?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 22 mai 2013 à 21:43, Franck [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> 
> If anybody can shed a light on the following strange behavior:  
> My index is updated every minute using a bulk processor with tens of documents per cycle. After 40 cycles or so, I noticed that my query doesn't count the new added documents (I'm using a simple HTTP GET req with the \_search endpoint). It is stuck with the same count of documents until I run an optimize on the index. The optimization seems to "refresh" the index and then my query count is accurate again.... until the next cycle kicks in and then I have to optimize the index again to see the latest docs counted in.  
> I also noticed that if I query a specific document using its \_id in the HTTP GET request, then ES returns me the document details without having to use optimize.  
> I currently using v 0.20.6 with a single shard no replica.
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US).  
> To unsubscribe from this group and all its topics, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Franck
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![garcimouche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/garcimouche/32/2297_2.png) [@garcimouche](https://discuss.elastic.co/u/garcimouche)\
**Post date:** [May 23, 2013, 11:24am UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/5 "2013-05-23T11:24:13Z")

</div>

Out of Topic: it was the one from last year, saw it on Parleys, excellent.

Ok this is my settings:  
{

"ok" : true,  
"cluster\_name" : "cluster\_prod",  
"nodes" : {  
"oM9TizIFT3CFN59cfoyJDA" : {  
"name" : "AS400 PROD",  
"transport\_address" : "inet[/172.17.54.81:9300]",  
"hostname" : "[PROD.mycomp.com](http://PROD.mycomp.com)",  
"version" : "0.20.6",  
"http\_address" : "inet[/172.17.54.81:9200]",  
"settings" : {  
"foreground" : "yes",  
"logger.prefix" : "",  
"path.home" : "/opt/elasticsearch",  
"pidfile" : "/home/jboss/es.pid",  
"compress.lzf.decoder" : "safe",  
"index.number\_of\_shards" : "1",  
"node.name" : "AS400 UNITED",  
"index.number\_of\_replicas" : "0",  
"cluster.name" : "cluster\_prod",  
"name" : "AS400 PROD",  
"path.logs" : "/opt/elasticsearch/logs"  
}  
}  
}  
}

The particularity is that I'm running ES on an iSeries IBM server. I  
don't know if it could have an influence but this is the only none  
conventional thing in the setup.

Detail:

IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 OS/400 ppc-32  
jvmap3260sr10-20111208 (JIT enabled, AOT enabled)

On Thu, May 23, 2013 at 6:54 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Out of topic: Cool! Was that this year or last year?  
> About refresh issue, I don't understand how this can happen. Can you print  
> your elasticsearch settings?
> 
> curl -XGET '[http://localhost:9200/\_nodes/settings?pretty](http://localhost:9200/_nodes/settings?pretty)'
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 23 mai 2013 à 12:40, Franck Garcia [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> 
> No I left the default value (1s). BTW I saw your DEVOXX presentation on ES  
> that inspired me a lot! Thanks for that.
> 
> On Wed, May 22, 2013 at 4:54 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Did you somehow disable refresh (-1 value)?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 22 mai 2013 à 21:43, Franck [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> > 
> > If anybody can shed a light on the following strange behavior:  
> > My index is updated every minute using a bulk processor with tens of  
> > documents per cycle. After 40 cycles or so, I noticed that my query doesn't  
> > count the new added documents (I'm using a simple HTTP GET req with the  
> > \_search endpoint). It is stuck with the same count of documents until I run  
> > an optimize on the index. The optimization seems to "refresh" the index and  
> > then my query count is accurate again.... until the next cycle kicks in and  
> > then I have to optimize the index again to see the latest docs counted in.  
> > I also noticed that if I query a specific document using its \_id in the  
> > HTTP GET request, then ES returns me the document details without having to  
> > use optimize.  
> > I currently using v 0.20.6 with a single shard no replica.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US)  
> > .  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Franck
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Franck

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![garcimouche](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/garcimouche/32/2297_2.png) [@garcimouche](https://discuss.elastic.co/u/garcimouche)\
**Post date:** [June 3, 2013, 6:43pm UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/6 "2013-06-03T18:43:39Z")

</div>

After a deep debugging session, I found out that the ES scheduler thread  
(for some reason) refuses to schedule any jobs after a while. The Index  
Refresher job was among them, hence my problem where I had to manually  
optimize the index which itself triggers a manual refresh in order to see  
my new documents addition. Dumping the JVM shows that the scheduler thread  
was alive but no more jobs were launched.(? and there were no hidden  
exception etc.)..  
I've discussed with my admin who setup a service package (PTF) on the  
machine that seems to have fixed the problem (jobs are scheduled, refresh  
is working, cross my fingers).... This is the detail of the working JVM  
(For the record):  
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 OS/400 ppc-32  
jvmap3260sr12-20121025\_01 (JIT enabled, AOT enabled)

J9VM - 20121024\_126067

JIT - r9\_20120914\_26057

GC - 20120928\_AA)

JCL - 20121014\_01

$

On Thu, May 23, 2013 at 7:24 AM, Franck Garcia [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com)wrote:

> Out of Topic: it was the one from last year, saw it on Parleys, excellent.
> 
> Ok this is my settings:  
> {
> 
> "ok" : true,  
> "cluster\_name" : "cluster\_prod",  
> "nodes" : {  
> "oM9TizIFT3CFN59cfoyJDA" : {  
> "name" : "AS400 PROD",  
> "transport\_address" : "inet[/172.17.54.81:9300]",  
> "hostname" : "[PROD.mycomp.com](http://PROD.mycomp.com)",  
> "version" : "0.20.6",  
> "http\_address" : "inet[/172.17.54.81:9200]",  
> "settings" : {  
> "foreground" : "yes",  
> "logger.prefix" : "",  
> "path.home" : "/opt/elasticsearch",  
> "pidfile" : "/home/jboss/es.pid",  
> "compress.lzf.decoder" : "safe",  
> "index.number\_of\_shards" : "1",  
> "node.name" : "AS400 UNITED",  
> "index.number\_of\_replicas" : "0",  
> "cluster.name" : "cluster\_prod",  
> "name" : "AS400 PROD",  
> "path.logs" : "/opt/elasticsearch/logs"  
> }  
> }  
> }  
> }
> 
> The particularity is that I'm running ES on an iSeries IBM server. I don't know if it could have an influence but this is the only none conventional thing in the setup.
> 
> Detail:
> 
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 OS/400 ppc-32 jvmap3260sr10-20111208 (JIT enabled, AOT enabled)
> 
> On Thu, May 23, 2013 at 6:54 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> > Out of topic: Cool! Was that this year or last year?  
> > About refresh issue, I don't understand how this can happen. Can you  
> > print your elasticsearch settings?
> > 
> > curl -XGET '[http://localhost:9200/\_nodes/settings?pretty](http://localhost:9200/_nodes/settings?pretty)'
> > 
> > --  
> > _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)_  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr[https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr)  
> > | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> > 
> > Le 23 mai 2013 à 12:40, Franck Garcia [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> > 
> > No I left the default value (1s). BTW I saw your DEVOXX presentation on  
> > ES that inspired me a lot! Thanks for that.
> > 
> > On Wed, May 22, 2013 at 4:54 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> > 
> > > Did you somehow disable refresh (-1 value)?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 22 mai 2013 à 21:43, Franck [garcia.franck@gmail.com](mailto:garcia.franck@gmail.com) a écrit :
> > > 
> > > If anybody can shed a light on the following strange behavior:  
> > > My index is updated every minute using a bulk processor with tens of  
> > > documents per cycle. After 40 cycles or so, I noticed that my query doesn't  
> > > count the new added documents (I'm using a simple HTTP GET req with the  
> > > \_search endpoint). It is stuck with the same count of documents until I run  
> > > an optimize on the index. The optimization seems to "refresh" the index and  
> > > then my query count is accurate again.... until the next cycle kicks in and  
> > > then I have to optimize the index again to see the latest docs counted in.  
> > > I also noticed that if I query a specific document using its \_id in the  
> > > HTTP GET request, then ES returns me the document details without having to  
> > > use optimize.  
> > > I currently using v 0.20.6 with a single shard no replica.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US)  
> > > .  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > Franck
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Franck

--  
Franck

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![raidex\_sym](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@raidex\_sym](https://discuss.elastic.co/u/raidex_sym)\
**Post date:** [November 13, 2014, 4:50pm UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/7 "2014-11-13T16:50:22Z")

</div>

I am having what seems like an identical issue: despite running a bulk  
insert job with 48 bulk threads active (queuing hovers ~100), I see no docs  
on the index. Yet if I do a simple curl call to insert a test document, it  
gets reflected immediately. Despite the apparent bulk thread activity,  
resource usage on the box is appallingly low, and I see no growth in the  
index files. This is a bare metal box with 24 cores and 64GB RAM. My  
settings are as follows (note refresh to 30s -- manual refresh/optimize  
seems to have no effect)

"indices" : {  
"store" : {  
"throttle" : {  
"type" : "merge",  
"max\_bytes\_per\_sec" : "500mb"  
}  
},  
"memory" : {  
"index\_buffer\_size" : "70%"  
}  
},  
"cluster" : {  
"name" : "mycluster"  
},  
"config" : "/config/elasticsearch.yml",  
"threadpool" : {  
"search" : {  
"type" : "fixed",  
"size" : "20",  
"queue\_size" : "1000"  
},  
"bulk" : {  
"type" : "fixed",  
"size" : "48",  
"queue\_size" : "1000"  
},  
"index" : {  
"type" : "fixed",  
"queue\_size" : "1000",  
"size" : "20"  
}  
},  
"index" : {  
"store" : {  
"compress" : {  
"stored" : "true"  
},  
"type" : "mmapfs"  
},  
"translog" : {  
"flush\_threshold\_ops" : "25000"  
},  
"refresh\_interval" : "30s",  
"merge" : {  
"policy" : {  
"max\_merge\_size" : "500mb"  
}  
}  
},  
"name" : "Vindicator"  
}  
}  
}  
}

On Thursday, May 23, 2013 6:54:19 AM UTC-4, David Pilato wrote:

> Out of topic: Cool! Was that this year or last year?  
> About refresh issue, I don't understand how this can happen. Can you print  
> your elasticsearch settings?
> 
> curl -XGET '[http://localhost:9200/\_nodes/settings?pretty](http://localhost:9200/_nodes/settings?pretty)'
> 
> --  
> _David Pilato_ | _Technical Advocate_ | _[Elasticsearch.com](http://Elasticsearch.com)  
> [http://Elasticsearch.com](http://Elasticsearch.com)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 23 mai 2013 à 12:40, Franck Garcia \<[garcia...@gmail.com](mailto:garcia...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> No I left the default value (1s). BTW I saw your DEVOXX presentation on ES  
> that inspired me a lot! Thanks for that.
> 
> On Wed, May 22, 2013 at 4:54 PM, David Pilato \<[da...@pilato.fr](mailto:da...@pilato.fr)  
> \<javascript:\>\> wrote:
> 
> > Did you somehow disable refresh (-1 value)?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 22 mai 2013 à 21:43, Franck \<[garcia...@gmail.com](mailto:garcia...@gmail.com) \<javascript:\>\> a  
> > écrit :
> > 
> > If anybody can shed a light on the following strange behavior:  
> > My index is updated every minute using a bulk processor with tens of  
> > documents per cycle. After 40 cycles or so, I noticed that my query doesn't  
> > count the new added documents (I'm using a simple HTTP GET req with the  
> > \_search endpoint). It is stuck with the same count of documents until I run  
> > an optimize on the index. The optimization seems to "refresh" the index and  
> > then my query count is accurate again.... until the next cycle kicks in and  
> > then I have to optimize the index again to see the latest docs counted in.  
> > I also noticed that if I query a specific document using its \_id in the  
> > HTTP GET request, then ES returns me the document details without having to  
> > use optimize.  
> > I currently using v 0.20.6 with a single shard no replica.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/wTbgqF-traM/unsubscribe?hl=en-US)  
> > .  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> Franck
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0776710a-a432-4953-a76f-a7ab7f5c4c48%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0776710a-a432-4953-a76f-a7ab7f5c4c48%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:50am UTC](https://discuss.elastic.co/t/index-not-refreshed-query-count-result-not-accurate/12081/8 "2017-07-06T00:50:11Z")

</div>


