django-elasticsearch-dsl-drf icon indicating copy to clipboard operation
django-elasticsearch-dsl-drf copied to clipboard

Fix AggsProxy import with elasticsearch-dsl team approach

Open millerf opened this issue 1 year ago • 2 comments

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 avatar Nov 24 '24 19:11 millerf

@barseghyanartur

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

millerf avatar Dec 01 '24 20:12 millerf

Great working on my side. Thank you

Redowan-Ahmed avatar Dec 18 '24 23:12 Redowan-Ahmed