spring-data-jest icon indicating copy to clipboard operation
spring-data-jest copied to clipboard

Support for ES 7.x

Open cecchisandrone opened this issue 6 years ago • 15 comments

Is there a plan to support ES 7?

cecchisandrone avatar Jun 13 '19 10:06 cecchisandrone

Hi @cecchisandrone , The idea is to keep close as possible than Spring Data Elasticsearch. Just after SDES will support ES 7, I will try to add also the support.

However, It's possible that the current version works well with ES 7. Are you already detected some bugs or incompatiblilities with ES7 ?

VanRoy avatar Jun 23 '19 16:06 VanRoy

Next SDE Moore 3.2.RC2 will support ES 6.8.1! See https://github.com/spring-projects/spring-data-elasticsearch/commit/a9d57936c32b6e1ab811ad768c6dec5c2dc85e18

DanielFran avatar Jul 10 '19 23:07 DanielFran

Hi, I installed ES 7.3.0 and Spring Boot 2.1.2, Spring Data Jest 3.2.3 and run into the following issue to get the total elements of an search result which is working with ES 6:

java.lang.UnsupportedOperationException: JsonObject
	at com.google.gson.JsonElement.getAsLong(JsonElement.java:231) ~[gson-2.8.5.jar:na]
	at io.searchbox.core.SearchResult.getTotal(SearchResult.java:218) ~[jest-common-6.3.1.jar:na]

Thanks, Daniel

CanD42 avatar Aug 08 '19 09:08 CanD42

And now SDE 4.0.x will support ES 7.3.0. See https://github.com/spring-projects/spring-data-elasticsearch/pull/302

DanielFran avatar Aug 15 '19 23:08 DanielFran

Spring-data Moore has been released on Oct 1th: https://spring.io/blog/2019/10/01/spring-data-moore-goes-ga

@VanRoy Are you expecting to release 3.2.6 soon?

DanielFran avatar Oct 26 '19 15:10 DanielFran

@DanielFran , I plan a 3.2.6 that match with SDES 3.2.0.RELEASE quickly. Unfortunaly it's not support ES 7.x for now, it's plan for SDES 4.x

VanRoy avatar Nov 01 '19 10:11 VanRoy

Hi @DanielFran , I just release 3.3.0.RELEASE that target Spring data Moore 3.2.1 is out using elastic 6.8.4, and spring-boot 2.2.1.

VanRoy avatar Nov 08 '19 21:11 VanRoy

@VanRoy what is the plan to support 7.4 version of ES ?

anton1y avatar May 07 '20 17:05 anton1y

@anton1y Yes, it's planned as usual as soon as SpringDataElasticsearch release is published. In the case of ES 7.x the version of SDES is 4.x and is currently in RC. So I expect that coming soon.

VanRoy avatar May 09 '20 07:05 VanRoy

@VanRoy , spring data 4 is there... Are you planning a concrete date to release?

anton1y avatar May 28 '20 05:05 anton1y

Hi. Still beginner about spring data elasticsearch. Can anyone please explain what is the use of jest ? It is not provided by the official documentation neither in spring data elasticsearch nor in elasticsearch. For the newer versions (7.7 I think) elasticsearch community introducted the Java High Level REST Client. What is the difference between that client and Jest ? ( Sorry, I know that I should ask in SO and not here ).

amirensit avatar May 31 '20 16:05 amirensit

Hello @amirensit , SpringDataJest is born to allow usage of Spring Data with Elasticsearch on environment where ES native protocol is not supported ( like managed ES on AWS ). Since Spring Data Elasticseach 4 that support REST client, Spring Data Jest is not really useful for new project.

VanRoy avatar Jun 02 '20 20:06 VanRoy

@VanRoy, is there any update on planned support for ES 7.x? Could you pls indicate the timelines or suggest alternatives? Thanks!

kashifiq avatar Jun 24 '20 11:06 kashifiq

Hi @kashifiq , I started the migration but this is a major refactoring and require lot of work to upgrade to match with Spring Data 4.0.

So the alternatives are :

  • Move your code to Spring Data Elasticsearch 4.0
  • Try to use Spring Data Jest 3.3.1 with ES 7.x ( main features should work ) and report me issues, i can see if I can make some minor fixes for ES 7.x

VanRoy avatar Jun 24 '20 19:06 VanRoy

Hi @VanRoy , Thanks for your response! I tried with Spring Data Jest 3.3.1 and ES 7.6 and got the following error trace:

+++++++++++++++++++++++++++++ java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'imageController' defined in file [/home/jenkins/workspace/is_genesis-image-service_develop/target/classes/com/optum/genesis/image/controller/ImageController.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageMetadataRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"}],"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"} , message : null Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'imageMetadataRepository': Invocation of init method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"}],"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"} , message : null Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.elasticsearch.repository.support.SimpleElasticsearchRepository]: Constructor threw exception; nested exception is com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"}],"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"} , message : null Caused by: com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 400 , error : {"root_cause":[{"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"}],"type":"parse_exception","reason":"unknown key [index.refresh_interval] for create index"} , message : null ++++++++++++++++++++++

kashifiq avatar Jun 25 '20 12:06 kashifiq