photon icon indicating copy to clipboard operation
photon copied to clipboard

Support Elasticsearch 6.x

Open genthalili opened this issue 6 years ago • 14 comments

Any update to support ES 6.x?

genthalili avatar Apr 19 '18 14:04 genthalili

7.x is also out now. Any updates?

gnanakeethan avatar Mar 27 '19 03:03 gnanakeethan

We welcome any contribution. Would you have interests in creating a pull request :smile: ?

karussell avatar Mar 27 '19 08:03 karussell

@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.

gnanakeethan avatar Mar 27 '19 08:03 gnanakeethan

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).

simonpoole avatar Mar 27 '19 08:03 simonpoole

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.

simonpoole avatar Apr 25 '19 18:04 simonpoole

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

missinglink avatar Dec 10 '19 13:12 missinglink

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

tuempeltaucher avatar May 06 '20 11:05 tuempeltaucher

Updating ES would also require that we settle for a solution of #285

otbutz avatar Jun 15 '20 09:06 otbutz

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?

adonig avatar Aug 22 '20 20:08 adonig

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

lonvia avatar Dec 23 '20 11:12 lonvia

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?

lonvia avatar Apr 03 '21 20:04 lonvia

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.

otbutz avatar May 25 '21 10:05 otbutz

For the testing side, https://www.testcontainers.org/modules/elasticsearch/ can be used, as spring-data-elasticsearch uses

nyilmaz avatar Aug 05 '21 12:08 nyilmaz

Yet another suggestion for tests/embedded mode: https://github.com/codelibs/opensearch-runner

lonvia avatar Feb 26 '24 13:02 lonvia