# Indexing script with parameters into percolation field breaks in 8.5

**URL:** <https://discuss.elastic.co/t/indexing-script-with-parameters-into-percolation-field-breaks-in-8-5/327667>\
**Category:** Elasticsearch\
**Created:** [March 14, 2023, 1:07pm UTC](https://discuss.elastic.co/t/indexing-script-with-parameters-into-percolation-field-breaks-in-8-5/327667 "2023-03-14T13:07:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cehj](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@cehj](https://discuss.elastic.co/u/cehj)\
**Post date:** [March 14, 2023, 1:07pm UTC](https://discuss.elastic.co/t/indexing-script-with-parameters-into-percolation-field-breaks-in-8-5/327667/1 "2023-03-14T13:07:26Z")

</div>

When indexing into a percolation field on a document, we submit something like:

```auto
{
    "bool": {
        "filter": [
            {
                "script": {
                    "script": {
                        "source": "blah blah params['points']",
                        "params": {
                            "points": [...]
                        }
                    }
                }
            }
        ],
        ...
    }
}

```

This works fine on anything before 8.5, but on 8.5 and after it raises this error:

```auto
{
    "type": "mapper_parsing_exception",
    "reason": "failed to parse",
    "caused_by": {
        "type": "x_content_parse_exception",
        "reason": "[1:344] [bool] failed to parse field [filter]",
        "caused_by": {
            "type": "x_content_parse_exception",
            "reason": "[1:344] [script] failed to parse field [params]",
            "caused_by": {
                "type": "unsupported_operation_exception",
                "reason": null
            }
        }
    }
}

```

When using the same query to filter the documents instead of attempting to index it into a percolation field, it works fine on 8.5 also.

From what I can see, nothing relevant changed in the documentation for scripts/percolation between these versions, and there is nothing in the release notes.

Thank you

---

<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:** [April 11, 2023, 1:07pm UTC](https://discuss.elastic.co/t/indexing-script-with-parameters-into-percolation-field-breaks-in-8-5/327667/2 "2023-04-11T13:07:41Z")

</div>

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