Comments (6)
So far #39 has only been merged to develop
. I ran into some troubles testing it on our stage-server, because it unfortunately was running a very old 1.x
-version of Elastic too.
My thinking was to wait with merging it into master
and releasing a new version until after I could test it on our stage-servers for a slightly bigger real-world test than my laptop. And then after merging to master
, close this issue.
from imbo-metadata-search.
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?
from imbo-metadata-search.
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.
(This transformation is the one that gets tested here: https://github.com/imbo/imbo-metadata-search/blob/b2c77728f25088403024570808cb65280c45ec4e/tests/phpunit/ImboMetadataSearchUnitTest/Dsl/Transformations/ElasticSearchDslTest.php)
from imbo-metadata-search.
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 5.0
, 5.1
and 5.2
, I'd go for it. Can't really see how this would be possible though, but as I said earlier, I'm not to familiar with the inner workings of this component.
from imbo-metadata-search.
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.
Right now we translate into a ES query that got deprecated by ES 2.0 - but I think I've found a way to translate it into a query that works identically using the new syntax introduced in 2.0.
Basically, right now we translate something like { "$and": [ { "foo": "bar" }, { "baz": "blargh" } ] }
into something like
{ "query": {
"filtered": { "filter": { "and": [
{ "query": { "match": { "foo": "bar" } } },
{ "query": { "match": { "baz": "blargh" } } }
] } }
} }
This is called the filtered
syntax in E.S. - this is what got deprecated in 2.0 (It is also the reason why the search-filtering is currently suboptimal, but that's another story).
Instead we should use something like the bool
-syntax which would instead look like
{ "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+
from imbo-metadata-search.
Should this issue be closed as a consequence of #39 being merged?
from imbo-metadata-search.
Related Issues (14)
- Query DSL representation HOT 4
- Sorting/ordering of images is not consistent HOT 1
- Tokenization of metadata HOT 4
- Lowercasing in the ES DSL transformation HOT 4
- What types of result modifiers do we need to support in the search?
- Remove lowercasing from Imbo DSL -> AST transformation HOT 1
- Add support for global search
- Describe the DSL on the readme HOT 1
- Use one elasticsearch index for storing metadata
- Change endpoints HOT 1
- 500 when inserting wrong elastic type HOT 2
- Model is missing a method
- Documents inserted into ElasticSearch has a query-property HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imbo-metadata-search.