# Results are not changed after index updating

**URL:** <https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119>\
**Category:** Elasticsearch\
**Created:** [April 23, 2021, 6:07pm UTC](https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119 "2021-04-23T18:07:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guilherme\_maranhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guilherme_maranhao/32/101483_2.png) [@guilherme\_maranhao](https://discuss.elastic.co/u/guilherme_maranhao)\
**Post date:** [April 23, 2021, 6:07pm UTC](https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119/1 "2021-04-23T18:07:00Z")

</div>

Hi everyone,

I have a bool query:

```
from: 0,
size: 10,
query: {
      bool: {
            must: [
                    { term: { boolean_field: false } },
                    { term: { integer_field: *something* } },
                    { term: { integer_field: *something else* } }
            ]
      }
}
sort:
    [
      { another_field_1: {"order": "desc"} },
      { another_field_2: {"order": "desc"} }
    ]

```

We need to immediately update our results after the user changes the `boolean_field` to true. The problem is that sometimes, this result is not being changed. It seems that the data is cached.  
I've already set the clause `request_cache=false` in the search body, but the query never ends.

Does anybody know if it's something related to some elasticsearch caching setting? or do I need to change my query clause?

Thanks a lot,

Guilherme

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 27, 2021, 1:09am UTC](https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119/2 "2021-04-27T01:09:25Z")

</div>

> [@guilherme\_maranhao](#):
>
> The problem is that sometimes, this result is not being changed

Why do you say that?

---

<div class="post-metadata">

**Author:** ![guilherme\_maranhao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guilherme_maranhao/32/101483_2.png) [@guilherme\_maranhao](https://discuss.elastic.co/u/guilherme_maranhao)\
**Post date:** [April 27, 2021, 1:59pm UTC](https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119/3 "2021-04-27T13:59:41Z")

</div>

Hi @warkolm ! I said that because, sometimes the results are not being refreshed! Maybe I did not express myself very well.

But it was solved! I had to set the `refresh_interval: "1s"` to force elasticsearch to refresh it after 1 second.

Thanks!

Guilherme

---

<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:** [May 25, 2021, 2:00pm UTC](https://discuss.elastic.co/t/results-are-not-changed-after-index-updating/271119/4 "2021-05-25T14:00:16Z")

</div>

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