photon
photon copied to clipboard
Support Elasticsearch 6.x
Any update to support ES 6.x?
7.x is also out now. Any updates?
We welcome any contribution. Would you have interests in creating a pull request :smile: ?
@karussell I am new to this space, as well as Java. I will see if I can make the patches up to a good level.
I suppose that if somebody is going to invest the time, it might be a good idea to investigate if their are any advantages to switching to https://opendistro.github.io/for-elasticsearch/ (I suspect that mainly the additional monitoring etc could be interesting).
Pro memoria: switching to 7.x and later will require migrating to the REST client instead of the deprecated transport client. Probably not a big deal as such, but still implies some work.
FYI I just upgraded Pelias to ES6 (also like 99% support for ES7 too) I documented all the steps in this ticket: https://github.com/pelias/pelias/issues/719
I changed the code to support ES 7.6.2, no need to switch to the REST client.
I won't create a pull request because unit tests does not work and the embedded elasticsearch crashes.
https://github.com/tuempeltaucher/photon/commit/cd0d967552e28e476858011f6af3834d2660ab1a
Updating ES would also require that we settle for a solution of #285
Compatibility with ES 5.6.0 should be sufficient to make it run with ES 6 and 7. Sadly photon insists on ES 5.5.0 and I don't even know how to install this version of ES on OS X. Probably using Docker during development is the only way on OS X?
After some version research, the way forward on this seems to be the following:
- [x] update to ES 5.6.0
- [ ] come up with a solution for embedding
- [ ] switch to HTTP transport for client/server communication
- [ ] update to ES 7
I think I've come up with a solution for embedding. We can simple offer an alternative Lucene backend for that. I've implemented enough of a proof-of-concept implementation to be convinced it is possible. The ES backend would remain but with standalone mode only.
Now there is another unexpected complication with switching to the HTTP client. By loosing embedded mode, we also loose the framework for our integration tests. I've looked around what is recommended for integration tests these days and it's all a bit depressing. Here are the options I found:
- Spinning up a docker instance. (Starting a full OS for every test? Not an option.)
- https://github.com/alexcojocaru/elasticsearch-maven-plugin did look a bit more promising but as far as I understand it simply downloads and installs the full 250MB zip file from Elastic. Not lightweight either.
- It might be possible to abuse ES' internal integration tester. My personal favourite but does not look straightforward.
- Require the developer to provide an ES instance themselves and use that.
Any other options?
Do we really want to support two different backends? That's additional backend specific quirks and tickets. IMHO it's easier to streamline the setup process.
Require the developer to provide an ES instance themselves and use that.
I don't really see a problem with that.
For the testing side, https://www.testcontainers.org/modules/elasticsearch/ can be used, as spring-data-elasticsearch uses
Yet another suggestion for tests/embedded mode: https://github.com/codelibs/opensearch-runner