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

Fix AggsProxy import with elasticsearch-dsl team approach #319

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

millerf
Copy link

@millerf millerf commented Nov 24, 2024

See this comment by @miguelgrinberg (elasticsearch-dsl team @ Elastic).

This PR fixes the import issue in a future-proof way, while still being backward compatible.

AggsProxy can't be imported | functional.py | utils.py (Tested with elasticsearch-dsl==8.13.1 & django==5.0.4)

Testing instructions:

  • Remove the old version of django-elasticsearch-dsl-drf from a project that generates this error
pip uninstall django-elasticsearch-dsl-drf
  • Install this version
 pip install git+https://github.com/millerf/django-elasticsearch-dsl-drf@fix/aggs-proxy-import-error 

Run the server or some tests and verify it works.

Should fix #314 and close #315 #316 #318 (that took the same non-future-proof approach)

@millerf millerf force-pushed the fix/aggs-proxy-import-error branch from f745fc6 to 276280e Compare November 24, 2024 20:15
@millerf
Copy link
Author

millerf commented Dec 1, 2024

@barseghyanartur

There is some work needed to properly fix it, however I don't know enough of this plugin to properly do that.

srfonso added a commit to srfonso/django-elasticsearch-dsl-drf that referenced this pull request Dec 12, 2024
 Fix AggsProxy import with elasticsearch-dsl team approach barseghyanartur#319
@Redowan-Ahmed
Copy link

Great working on my side. Thank you

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

Successfully merging this pull request may close these issues.

cannot import name 'AggsProxy' from elasticsearch_dsl.search
2 participants