# Continuous Transform query, does it update?

**URL:** <https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443>\
**Category:** Elasticsearch\
**Tags:** transforms\
**Created:** [November 4, 2021, 5:47pm UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443 "2021-11-04T17:47:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iambatman](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@iambatman](https://discuss.elastic.co/u/iambatman)\
**Post date:** [November 4, 2021, 5:47pm UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/1 "2021-11-04T17:47:17Z")

</div>

If you use a query when creating a continuous transform will it only ever work on the query subset that is created when the transform is started?

```auto
{
  "bool": {
    "should": [
      {
        "match": {
          "state": "state_1"
        }
      },
      {
        "match": {
          "state": "state_2"
        }
      }
    ],
    "minimum_should_match": 1
  }
}

```

I have a transform that uses a query to initially filter some of my data by a 'state' field (e.g values of state\_1, state\_2 etc.) before creating the aggregation, the state can change e.g from state\_3 to state\_2 but this data is not in the transform.

If I delete the transform and start it again it will include the updated data, is this how a transform is supposed to work?

---

<div class="post-metadata">

**Author:** ![lcawley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lcawley/32/58441_2.png) [@lcawley](https://discuss.elastic.co/u/lcawley)\
**Post date:** [November 5, 2021, 1:00am UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/2 "2021-11-05T01:00:37Z")

</div>

Hi!

The [update transform API](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/update-transform.html) enables you to change a subset of the configuration details, including the query. For example:

```auto
POST _transform/test1/_update
{
  "source" : {
        "index" : [
          "myIndices"
        ],
        "query" : {
          "bool": {
            "should": [
              {
                "match": {
                  "state": "state_3"
                }
              },
              {
                "match": {
                  "state": "state_2"
                }
              }
              ],
              "minimum_should_match": 1
          }
        }
  }
}

```

---

<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:** [November 5, 2021, 1:03am UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/3 "2021-11-05T01:03:40Z")

</div>

Does [Transform limitations | Elasticsearch Guide [7.15] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-limitations.html#transform-consistency-limitations) help clarify things at all?

---

<div class="post-metadata">

**Author:** ![iambatman](https://avatars.discourse-cdn.com/v4/letter/i/45deac/32.png) [@iambatman](https://discuss.elastic.co/u/iambatman)\
**Post date:** [November 5, 2021, 8:43am UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/4 "2021-11-05T08:43:58Z")

</div>

Each time the continuous transform is refreshed is the query run again on all data or is the query only run once when the transform is started to create an initial subset?

---

<div class="post-metadata">

**Author:** ![lcawley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lcawley/32/58441_2.png) [@lcawley](https://discuss.elastic.co/u/lcawley)\
**Post date:** [November 5, 2021, 5:26pm UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/5 "2021-11-05T17:26:23Z")

</div>

It's the former. For continuous transforms, it's part of the process where the transform is checking for changes to source indices. There's some information about these checkpoints in the documentation:

> **[How transform checkpoints work | Elasticsearch Guide \[7.15\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/transform-checkpoints.html)**

---

<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:** [December 3, 2021, 5:26pm UTC](https://discuss.elastic.co/t/continuous-transform-query-does-it-update/288443/6 "2021-12-03T17:26:39Z")

</div>

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