Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Look into moving Elasticsearch queries into templates #111

Open
kevinschaper opened this issue Feb 17, 2017 · 2 comments
Open

Look into moving Elasticsearch queries into templates #111

kevinschaper opened this issue Feb 17, 2017 · 2 comments

Comments

@kevinschaper
Copy link
Contributor

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html

It looks like we can build stored templates for the queries. They can be pushed into the ES cluster (like the mapping is), and should make it much easier to tune & debug queries.

@oblodgett
Copy link
Member

What about using something like the following:

https://github.com/Fizzadar/ElasticQuery
https://github.com/elastic/elasticsearch-dsl-py

We could have each Domain Model now how to map itself, and build a query for itself. Field lists could be generated from each DM?

We wouldn't have to manage "template" files, where field names change in the mapping file and in the template files and in the DM. The mapping and query building could be generated directly from a DM and then we would only need to change fields in one spot.

@cmpich
Copy link
Contributor

cmpich commented Feb 21, 2017

Definitely an improvement. I do hope we eventually will put our 'base data' into a relational database and then use some kind of ORM (object-relational-mapping) to talk to the database.

@cmpich cmpich self-assigned this Mar 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants