# Inexplicable wrong results in automated tests

**URL:** <https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054>\
**Category:** Elasticsearch\
**Created:** [August 3, 2014, 3:22pm UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054 "2014-08-03T15:22:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [August 3, 2014, 3:22pm UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/1 "2014-08-03T15:22:50Z")

</div>

Hi

So after running a few rounds of local automated tests, I've noticed that  
sometimes I get the wrong results in my index. This seems to only be an  
issue with my automated tests and not when running the application manually  
(at least I haven't seen the wrong results after several executions).

My search looks like this:

SearchResponse searchResponse =  
esClient.client().prepareSearch(indexName).setTypes(RECORD\_TYPE)  
.setFetchSource(true)  
.setPostFilter(FilterBuilders.andFilter(  
FilterBuilders.inFilter("typeId",types.toArray(new  
Integer[]{})).cache(false),

FilterBuilders.inFilter("stateId",states.toArray(new  
Integer[]{})).cache(false)  
).cache(false))  
.addSort("dateCreated.value", SortOrder.DESC)  
.addSort("recordId",SortOrder.DESC)  
.execute().actionGet();

The issue appears both with and without the cache flag passed in.

The way my tests work is that I execute a bunch of seeds, then run queries  
against the seeds to verify I get the right results. I'll create 5 records  
in my test, where the typeId's are always 1,2,3,4 and the stateIds are  
anything between 1 and 14, except for 6.

5 is a special state in my case. I only want to include that state  
sometimes. So I'll run one query with all the states except 5 and 6. I  
expect that this will give me 4 records back (the 5th record is in state  
5). Instead I'm getting back 5 results, as if ES is also including state 5  
in the list even though I didn't want it.

In my test I run this query twice. The test fails sometimes on the first  
execution, never on the second execution (I have an arquillian deployment,  
and start up the app once, then seed data, run the first query in one test  
method, run the second query in a second test method). I'm assuming that  
these filters are acting like a pure AND - the record must match both  
fields to be returned. So, any idea why I might be getting the wrong  
results?

John

--  
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/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 4, 2014, 4:03pm UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/2 "2014-08-04T16:03:19Z")

</div>

Are you refreshing the index after inserting the test documents? I could be  
simply a matter of timing.

--  
Ivan

On Sun, Aug 3, 2014 at 8:22 AM, John D. Ament [john.d.ament@gmail.com](mailto:john.d.ament@gmail.com)  
wrote:

> Hi
> 
> So after running a few rounds of local automated tests, I've noticed that  
> sometimes I get the wrong results in my index. This seems to only be an  
> issue with my automated tests and not when running the application manually  
> (at least I haven't seen the wrong results after several executions).
> 
> My search looks like this:
> 
> SearchResponse searchResponse =  
> esClient.client().prepareSearch(indexName).setTypes(RECORD\_TYPE)  
> .setFetchSource(true)  
> .setPostFilter(FilterBuilders.andFilter(  
> FilterBuilders.inFilter("typeId",types.toArray(new  
> Integer{})).cache(false),
> 
> FilterBuilders.inFilter("stateId",states.toArray(new  
> Integer{})).cache(false)  
> ).cache(false))  
> .addSort("dateCreated.value", SortOrder.DESC)  
> .addSort("recordId",SortOrder.DESC)  
> .execute().actionGet();
> 
> The issue appears both with and without the cache flag passed in.
> 
> The way my tests work is that I execute a bunch of seeds, then run queries  
> against the seeds to verify I get the right results. I'll create 5 records  
> in my test, where the typeId's are always 1,2,3,4 and the stateIds are  
> anything between 1 and 14, except for 6.
> 
> 5 is a special state in my case. I only want to include that state  
> sometimes. So I'll run one query with all the states except 5 and 6. I  
> expect that this will give me 4 records back (the 5th record is in state  
> 5). Instead I'm getting back 5 results, as if ES is also including state 5  
> in the list even though I didn't want it.
> 
> In my test I run this query twice. The test fails sometimes on the first  
> execution, never on the second execution (I have an arquillian deployment,  
> and start up the app once, then seed data, run the first query in one test  
> method, run the second query in a second test method). I'm assuming that  
> these filters are acting like a pure AND - the record must match both  
> fields to be returned. So, any idea why I might be getting the wrong  
> results?
> 
> John
> 
> --  
> 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/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQAGYAseFmXpbQ%2BOGV\_toCmjrGGT7A3LqFmLwhsLi6Oxkg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAGYAseFmXpbQ%2BOGV_toCmjrGGT7A3LqFmLwhsLi6Oxkg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [August 4, 2014, 6:05pm UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/3 "2014-08-04T18:05:34Z")

</div>

I would think timing as an issue if I got a shorter list of results. I'm  
getting too many results in this case.

On Monday, August 4, 2014 12:03:35 PM UTC-4, Ivan Brusic wrote:

> Are you refreshing the index after inserting the test documents? I could  
> be simply a matter of timing.
> 
> --  
> Ivan
> 
> On Sun, Aug 3, 2014 at 8:22 AM, John D. Ament \<[john.d...@gmail.com](mailto:john.d...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hi
> > 
> > So after running a few rounds of local automated tests, I've noticed that  
> > sometimes I get the wrong results in my index. This seems to only be an  
> > issue with my automated tests and not when running the application manually  
> > (at least I haven't seen the wrong results after several executions).
> > 
> > My search looks like this:
> > 
> > SearchResponse searchResponse =  
> > esClient.client().prepareSearch(indexName).setTypes(RECORD\_TYPE)  
> > .setFetchSource(true)  
> > .setPostFilter(FilterBuilders.andFilter(
> > 
> > FilterBuilders.inFilter("typeId",types.toArray(new  
> > Integer{})).cache(false),
> > 
> > FilterBuilders.inFilter("stateId",states.toArray(new  
> > Integer{})).cache(false)  
> > ).cache(false))  
> > .addSort("dateCreated.value", SortOrder.DESC)  
> > .addSort("recordId",SortOrder.DESC)  
> > .execute().actionGet();
> > 
> > The issue appears both with and without the cache flag passed in.
> > 
> > The way my tests work is that I execute a bunch of seeds, then run  
> > queries against the seeds to verify I get the right results. I'll create 5  
> > records in my test, where the typeId's are always 1,2,3,4 and the stateIds  
> > are anything between 1 and 14, except for 6.
> > 
> > 5 is a special state in my case. I only want to include that state  
> > sometimes. So I'll run one query with all the states except 5 and 6. I  
> > expect that this will give me 4 records back (the 5th record is in state  
> > 5). Instead I'm getting back 5 results, as if ES is also including state 5  
> > in the list even though I didn't want it.
> > 
> > In my test I run this query twice. The test fails sometimes on the first  
> > execution, never on the second execution (I have an arquillian deployment,  
> > and start up the app once, then seed data, run the first query in one test  
> > method, run the second query in a second test method). I'm assuming that  
> > these filters are acting like a pure AND - the record must match both  
> > fields to be returned. So, any idea why I might be getting the wrong  
> > results?
> > 
> > John
> > 
> > --  
> > 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:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 4, 2014, 7:35pm UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/4 "2014-08-04T19:35:47Z")

</div>

Is it possible to provide a minimal test case with docs to reproduce this?

Jörg

On Mon, Aug 4, 2014 at 8:05 PM, John D. Ament [john.d.ament@gmail.com](mailto:john.d.ament@gmail.com)  
wrote:

> I would think timing as an issue if I got a shorter list of results. I'm  
> getting too many results in this case.
> 
> On Monday, August 4, 2014 12:03:35 PM UTC-4, Ivan Brusic wrote:
> 
> > Are you refreshing the index after inserting the test documents? I could  
> > be simply a matter of timing.
> > 
> > --  
> > Ivan
> > 
> > On Sun, Aug 3, 2014 at 8:22 AM, John D. Ament [john.d...@gmail.com](mailto:john.d...@gmail.com)  
> > wrote:
> > 
> > > Hi
> > > 
> > > So after running a few rounds of local automated tests, I've noticed  
> > > that sometimes I get the wrong results in my index. This seems to only be  
> > > an issue with my automated tests and not when running the application  
> > > manually (at least I haven't seen the wrong results after several  
> > > executions).
> > > 
> > > My search looks like this:
> > > 
> > > SearchResponse searchResponse = esClient.client().  
> > > prepareSearch(indexName).setTypes(RECORD\_TYPE)  
> > > .setFetchSource(true)  
> > > .setPostFilter(FilterBuilders.andFilter(  
> > > FilterBuilders.inFilter("typeId",types.toArray(new  
> > > Integer{})).cache(false),  
> > > FilterBuilders.inFilter("stateId",states.toArray(new  
> > > Integer{})).cache(false)  
> > > ).cache(false))  
> > > .addSort("dateCreated.value", SortOrder.DESC)  
> > > .addSort("recordId",SortOrder.DESC)  
> > > .execute().actionGet();
> > > 
> > > The issue appears both with and without the cache flag passed in.
> > > 
> > > The way my tests work is that I execute a bunch of seeds, then run  
> > > queries against the seeds to verify I get the right results. I'll create 5  
> > > records in my test, where the typeId's are always 1,2,3,4 and the stateIds  
> > > are anything between 1 and 14, except for 6.
> > > 
> > > 5 is a special state in my case. I only want to include that state  
> > > sometimes. So I'll run one query with all the states except 5 and 6. I  
> > > expect that this will give me 4 records back (the 5th record is in state  
> > > 5). Instead I'm getting back 5 results, as if ES is also including state 5  
> > > in the list even though I didn't want it.
> > > 
> > > In my test I run this query twice. The test fails sometimes on the  
> > > first execution, never on the second execution (I have an arquillian  
> > > deployment, and start up the app once, then seed data, run the first query  
> > > in one test method, run the second query in a second test method). I'm  
> > > assuming that these filters are acting like a pure AND - the record must  
> > > match both fields to be returned. So, any idea why I might be getting the  
> > > wrong results?
> > > 
> > > John
> > > 
> > > --  
> > > 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).
> > > 
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c65c050a-2898-4065-b3a5-c8ad0cda0ed1%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8930edda-a02d-4765-890e-8f89f47a5451%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAKdsXoEQQq4iUgwxcp\_\_yaQ%2B9cbqbfxD%3DzAvmxy5%2BguYK9%3DrNA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEQQq4iUgwxcp__yaQ%2B9cbqbfxD%3DzAvmxy5%2BguYK9%3DrNA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tihomir\_Lichev1](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tihomir\_Lichev1](https://discuss.elastic.co/u/Tihomir_Lichev1)\
**Post date:** [August 5, 2014, 7:40am UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/5 "2014-08-05T07:40:28Z")

</div>

I also had timing problems in my automated tests, the solution was to  
invoke index refresh and wait for it, then execute any search requests.  
This way you can make sure that all test data is ready for searching.

03 август 2014, неделя, 18:22:50 UTC+3, John D. Ament написа:

> Hi
> 
> So after running a few rounds of local automated tests, I've noticed that  
> sometimes I get the wrong results in my index. This seems to only be an  
> issue with my automated tests and not when running the application manually  
> (at least I haven't seen the wrong results after several executions).
> 
> My search looks like this:
> 
> SearchResponse searchResponse =  
> esClient.client().prepareSearch(indexName).setTypes(RECORD\_TYPE)  
> .setFetchSource(true)  
> .setPostFilter(FilterBuilders.andFilter(  
> FilterBuilders.inFilter("typeId",types.toArray(new  
> Integer{})).cache(false),
> 
> FilterBuilders.inFilter("stateId",states.toArray(new  
> Integer{})).cache(false)  
> ).cache(false))  
> .addSort("dateCreated.value", SortOrder.DESC)  
> .addSort("recordId",SortOrder.DESC)  
> .execute().actionGet();
> 
> The issue appears both with and without the cache flag passed in.
> 
> The way my tests work is that I execute a bunch of seeds, then run queries  
> against the seeds to verify I get the right results. I'll create 5 records  
> in my test, where the typeId's are always 1,2,3,4 and the stateIds are  
> anything between 1 and 14, except for 6.
> 
> 5 is a special state in my case. I only want to include that state  
> sometimes. So I'll run one query with all the states except 5 and 6. I  
> expect that this will give me 4 records back (the 5th record is in state  
> 5). Instead I'm getting back 5 results, as if ES is also including state 5  
> in the list even though I didn't want it.
> 
> In my test I run this query twice. The test fails sometimes on the first  
> execution, never on the second execution (I have an arquillian deployment,  
> and start up the app once, then seed data, run the first query in one test  
> method, run the second query in a second test method). I'm assuming that  
> these filters are acting like a pure AND - the record must match both  
> fields to be returned. So, any idea why I might be getting the wrong  
> results?
> 
> John

--  
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/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [August 5, 2014, 11:15am UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/6 "2014-08-05T11:15:48Z")

</div>

Hmm. So how do I invoke a reindex via the java API?

On Tue, Aug 5, 2014 at 3:40 AM, Tihomir Lichev [shoteff@gmail.com](mailto:shoteff@gmail.com) wrote:

> I also had timing problems in my automated tests, the solution was to  
> invoke index refresh and wait for it, then execute any search requests.  
> This way you can make sure that all test data is ready for searching.
> 
> 03 август 2014, неделя, 18:22:50 UTC+3, John D. Ament написа:
> 
> > Hi
> > 
> > So after running a few rounds of local automated tests, I've noticed that  
> > sometimes I get the wrong results in my index. This seems to only be an  
> > issue with my automated tests and not when running the application manually  
> > (at least I haven't seen the wrong results after several executions).
> > 
> > My search looks like this:
> > 
> > SearchResponse searchResponse = esClient.client().  
> > prepareSearch(indexName).setTypes(RECORD\_TYPE)  
> > .setFetchSource(true)  
> > .setPostFilter(FilterBuilders.andFilter(  
> > FilterBuilders.inFilter("typeId",types.toArray(new  
> > Integer{})).cache(false),  
> > FilterBuilders.inFilter("stateId",states.toArray(new  
> > Integer{})).cache(false)  
> > ).cache(false))  
> > .addSort("dateCreated.value", SortOrder.DESC)  
> > .addSort("recordId",SortOrder.DESC)  
> > .execute().actionGet();
> > 
> > The issue appears both with and without the cache flag passed in.
> > 
> > The way my tests work is that I execute a bunch of seeds, then run  
> > queries against the seeds to verify I get the right results. I'll create 5  
> > records in my test, where the typeId's are always 1,2,3,4 and the stateIds  
> > are anything between 1 and 14, except for 6.
> > 
> > 5 is a special state in my case. I only want to include that state  
> > sometimes. So I'll run one query with all the states except 5 and 6. I  
> > expect that this will give me 4 records back (the 5th record is in state  
> > 5). Instead I'm getting back 5 results, as if ES is also including state 5  
> > in the list even though I didn't want it.
> > 
> > In my test I run this query twice. The test fails sometimes on the first  
> > execution, never on the second execution (I have an arquillian deployment,  
> > and start up the app once, then seed data, run the first query in one test  
> > method, run the second query in a second test method). I'm assuming that  
> > these filters are acting like a pure AND - the record must match both  
> > fields to be returned. So, any idea why I might be getting the wrong  
> > results?
> > 
> > John
> 
> --  
> 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/uy0YrsXXw44/unsubscribe](https://groups.google.com/d/topic/elasticsearch/uy0YrsXXw44/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/16211527-5442-4e0e-ae64-62a0f30253d0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAOqetn8Yg3--qYSCvy60B\_iqro7abU\_cAEG%2BC7-HuzmDpogOfQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOqetn8Yg3--qYSCvy60B_iqro7abU_cAEG%2BC7-HuzmDpogOfQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tihomir\_Lichev1](https://avatars.discourse-cdn.com/v4/letter/t/f08c70/32.png) [@Tihomir\_Lichev1](https://discuss.elastic.co/u/Tihomir_Lichev1)\
**Post date:** [August 5, 2014, 11:53am UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/7 "2014-08-05T11:53:21Z")

</div>

Sort of:

TransportClient transportClient = _new_ TransportClient(settings); // just  
an example of transport client instantiation, you can use your own

transportClient.getClient().admin().indices().refresh(_Requests_  
.refreshRequest(indexName)).actionGet(); // actionGet() as you may know it  
to make the call synchronous and wait for it until done (otherwise it is  
async)

--  
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/348578e9-4fd1-4209-8995-1637c963fe70%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/348578e9-4fd1-4209-8995-1637c963fe70%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, 1:10am UTC](https://discuss.elastic.co/t/inexplicable-wrong-results-in-automated-tests/19054/8 "2017-07-06T01:10:45Z")

</div>


