spring-data-jest
spring-data-jest copied to clipboard
Support for ES 7.x
Is there a plan to support ES 7?
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 ?
Next SDE Moore 3.2.RC2 will support ES 6.8.1! See https://github.com/spring-projects/spring-data-elasticsearch/commit/a9d57936c32b6e1ab811ad768c6dec5c2dc85e18
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
And now SDE 4.0.x will support ES 7.3.0. See https://github.com/spring-projects/spring-data-elasticsearch/pull/302
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 , 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
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 what is the plan to support 7.4 version of ES ?
@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 , spring data 4 is there... Are you planning a concrete date to release?
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 ).
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, is there any update on planned support for ES 7.x? Could you pls indicate the timelines or suggest alternatives? Thanks!
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
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 ++++++++++++++++++++++