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

Construct ES queries in backend #1349

Open
lukavdplas opened this issue Dec 5, 2023 · 1 comment
Open

Construct ES queries in backend #1349

lukavdplas opened this issue Dec 5, 2023 · 1 comment
Labels
backend changes to the django backend code quality code & performance improvements that do not affect user functionality frontend changes to the angular frontend

Comments

@lukavdplas
Copy link
Contributor

lukavdplas commented Dec 5, 2023

I'm making this issue mostly as reference point, as the idea has come up a few times (e.g. #1292 , #1099 )

For the most part, elasticsearch queries are constructed entirely by the frontend and forwarded to elasticsearch by the backend. There are some exceptions to this:

  • The backend analysis for visualisation often includes adjustments to the search query, such as adding extra filters.
  • Since 5.3.0, a query to the backend includes an es_query and an optional key tags that specifies user tags to filter on.

It would be more consistent if we moved the conversion to and from an elasticsearch query entirely to the backend and used an I-analyzer-specific "intermediary representation" in the API.

This makes it easier to implement certain features (such as tagging).

@lukavdplas lukavdplas added code quality code & performance improvements that do not affect user functionality frontend changes to the angular frontend backend changes to the django backend labels Dec 5, 2023
@BeritJanssen
Copy link
Contributor

BeritJanssen commented Feb 15, 2024

Places where the frontend now directly construct ES queries

  • search queries
  • download
  • visualization (histograms construct the visualization query itself, others send search query)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend changes to the django backend code quality code & performance improvements that do not affect user functionality frontend changes to the angular frontend
Projects
None yet
Development

No branches or pull requests

2 participants