-
Notifications
You must be signed in to change notification settings - Fork 4
Incompatible with ElasticSearch 5.2 #38
Comments
I haven't touched this code at all so I'm not sure I follow. Is the DSL-transformation part of this package, or is that some related package with it's own releases? |
The transformation is part of this package. A rough summary is that this package contains a DSL for writing queries in (which is a superset of Mongo's query-syntax), as well as interfaces for how to write a backend. Each backend is responsible for receiving a query in the DSL-language and the performing it in the backend. This package then also contains a ElasticSearch backend-implementation, and the part that takes the query-DSL and converts it into something E.S. can understand is the DSL-transformation. |
Right. I think that when changing the public DSL, if that is needed to fix this issue), the semver-major should be bumped. If there is a way to fix this by only fixing the ES backend, and keeping bc by making it work with |
The public DSL wouldn't have to change. The only thing that needs to change is how the ES backend translate that into a ES-query. Basically, right now we translate something like { "query": {
"filtered": { "filter": { "and": [
{ "query": { "match": { "foo": "bar" } } },
{ "query": { "match": { "baz": "blargh" } } }
] } }
} } This is called the Instead we should use something like the { "query": {
"bool": { "must": [
{ "match": { "foo": "bar" } },
{ "match": { "baz": "blargh" } }
] }
} } (The two examples are off-the-top-of-my-head, so there might be some slight syntax differences to this - but it should convey the right point) So the bc break would be that we increase the minimum version of ES servers we support. Right now we support 1.x -> 5.0, but I would like to change it so that it's 2.0+ |
Should this issue be closed as a consequence of #39 being merged? |
So far #39 has only been merged to My thinking was to wait with merging it into |
The part of the ElasticSearch Search-DSL that we are using in the E.S.-backend was deprecated in 2.0.0-beta, and doesn't work in 5.2 (I haven't checked 5.1, and I think we run 5.0 in production where it works).
So we should update the ElasticSearch DSL-transformation to use a syntax that works from 2.0 and upwards.
We currently use the
filtered
-syntax, and we should probably move over to thebool
-syntax - I've made a few tests that indicate that thebool
-syntax seems to support the types of query that we support.But what are peoples opinion on this? Should we simply change the transformation, which means that pre-2.0 will stop working (and thus should bump the semver-major version of this package), or should we have two different E.S.-backends depending on which version you run?
The text was updated successfully, but these errors were encountered: