Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in filter aggregation with script #1931

Closed
tormodu opened this issue Mar 18, 2016 · 4 comments
Closed

Bug in filter aggregation with script #1931

tormodu opened this issue Mar 18, 2016 · 4 comments
Assignees

Comments

@tormodu
Copy link

tormodu commented Mar 18, 2016

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.

@Mpdreamz
Copy link
Member

Which version of Elasticsearch are you using?

@tormodu
Copy link
Author

tormodu commented Mar 18, 2016

Version 2.2.1

@Mpdreamz
Copy link
Member

Definitely a bug on our end i just pushed a fix for this

#1944

Thanks a ton for raising the issue 👍

@Mpdreamz Mpdreamz self-assigned this Mar 23, 2016
gmarz added a commit that referenced this issue Mar 23, 2016
fix #1931 script query was not serializing properly
@gmarz gmarz added Bug labels Mar 23, 2016
@gmarz
Copy link
Contributor

gmarz commented Mar 23, 2016

Closed via #1944

@gmarz gmarz closed this as completed Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants