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

TypeError: elasticsearch_dsl.aggs.A() got multiple values for keyword argument 'filter' #1902

Closed
rikkt0r opened this issue Sep 6, 2024 · 1 comment

Comments

@rikkt0r
Copy link
Contributor

rikkt0r commented Sep 6, 2024

Error occures when accessing bucket aggregation containing a filter directly from AggBase derivate instead of .aggs dict.

The cause of this is the "filter" kwarg passed excessively, colliding with related aggregation params

Minimal sample to reproduce:

b = aggs.Filter(query.Terms(something=[1, 2, 3]))

a = aggs.Terms(field="some_field", size=100)
a.bucket("b", b)

a.aggs['b']  # Ok !
a['b']  # TypeError: elasticsearch_dsl.aggs.A() got multiple values for keyword argument 'filter'
miguelgrinberg pushed a commit that referenced this issue Sep 11, 2024
* Remove excessive filter kwarg appearing in AggBase direct aggregation access (#1902)

* Typo (#1902)
github-actions bot pushed a commit that referenced this issue Sep 11, 2024
* Remove excessive filter kwarg appearing in AggBase direct aggregation access (#1902)

* Typo (#1902)

(cherry picked from commit b06a222)
miguelgrinberg pushed a commit that referenced this issue Sep 11, 2024
#1906)

* Remove excessive filter kwarg appearing in AggBase direct aggregation access (#1902)

* Typo (#1902)

(cherry picked from commit b06a222)

Co-authored-by: Grzegorz Wójcicki <[email protected]>
@rikkt0r
Copy link
Contributor Author

rikkt0r commented Sep 12, 2024

I'm closing this issue. The patch will arrive in the upcoming 8.15.3 release

@rikkt0r rikkt0r closed this as completed Sep 12, 2024
miguelgrinberg pushed a commit to miguelgrinberg/elasticsearch-dsl-py that referenced this issue Dec 9, 2024
…ic#1903)

* Remove excessive filter kwarg appearing in AggBase direct aggregation access (elastic#1902)

* Typo (elastic#1902)
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

1 participant