Skip to content

Bug in filter aggregation with script #1931

Closed
@tormodu

Description

@tormodu

When using filter aggregation with an inline script as filter nest generates an incorrect query to elasticsearch.

The following code:
.Filter("NAME", htw => htw.Filter(htwFlt => htwFlt.Script(hwScrpt => hwScrpt.Inline("SCRIPT "))))

generates the following query:

"NAME": { "filter": { "script": { "inline": "SCRIPT" } },

Elasticsearch responds with [script] query does not support [inline]
Changing the query to:

"NAME": { "filter": { "script": { "script": "SCRIPT" } },

produces the correct result.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions