# "Sub-iterators of ConjunctionDISI are not on the same document!" error

**URL:** <https://discuss.elastic.co/t/sub-iterators-of-conjunctiondisi-are-not-on-the-same-document-error/292743>\
**Category:** Elasticsearch\
**Created:** [December 22, 2021, 10:08pm UTC](https://discuss.elastic.co/t/sub-iterators-of-conjunctiondisi-are-not-on-the-same-document-error/292743 "2021-12-22T22:08:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bperalta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bperalta/32/57782_2.png) [@bperalta](https://discuss.elastic.co/u/bperalta)\
**Post date:** [December 22, 2021, 10:08pm UTC](https://discuss.elastic.co/t/sub-iterators-of-conjunctiondisi-are-not-on-the-same-document-error/292743/1 "2021-12-22T22:08:33Z")

</div>

Using an index containing a nested field, we get the "Sub-iterators of ConjunctionDISI are not on the same document!" error if the search use intervals query and the searched value is empty (after filtering for example).

1- Create a simple index :

```auto
PUT simple_test
{
    "mappings": {
        "properties": {
            "object": {
                "type": "text"
            },
            "documents": {
                "type": "nested",
                "properties": {
                    "content": {
                        "type": "text"
                    }
                }
            }
        }
    }
}

```

2- Add a document

```auto
POST simple_test/_doc/1
{
    "object": "test"
}

```

3- Execute an empty intervals query

```auto
POST simple_test/_search
{
    "query": {
        "intervals": {
            "object": {
                "match": {
                    "query": "",
                    "max_gaps": 2,
                    "ordered": false
                }
            }
        }
    }
}

```

For this example I specified an empty value, but querying a searched value wich is cleared by some filters have the same result.

Tested with Elasticsearch 7.16.1

---

<div class="post-metadata">

**Author:** ![bperalta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bperalta/32/57782_2.png) [@bperalta](https://discuss.elastic.co/u/bperalta)\
**Post date:** [January 3, 2022, 10:04am UTC](https://discuss.elastic.co/t/sub-iterators-of-conjunctiondisi-are-not-on-the-same-document-error/292743/2 "2022-01-03T10:04:57Z")

</div>

With ES 7.2.4 (and before) this error does not appear

---

<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:** [January 31, 2022, 10:05am UTC](https://discuss.elastic.co/t/sub-iterators-of-conjunctiondisi-are-not-on-the-same-document-error/292743/3 "2022-01-31T10:05:55Z")

</div>

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