New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to Elasticsearch 2.0 [DATAES-211] #784
Comments
Christoph Strobl commented issue branch available at https://github.com/spring-projects/spring-data-elasticsearch/tree/issue%2F[DATAES-211](https://jira.spring.io/browse/DATAES-211) |
Przemek commented Do you have any road map / timeline for the support of version 2.0 and above? |
Mohsin Husen commented We are working on supporting 2.x, this will be available with Spring data "Hopper" release. |
Abhishek Ranjan commented I tried working with the Spring Data Elasticsearch 1.4.Snapshot Build which is part of Hopper release but it also has elasticsearch 1.7.3. Is there a timeline in which even a Snapshot Build will be available with 2.x support ? |
Youcef HILEM commented I tried working with the Spring Data Elasticsearch 1.4.Snapshot But I can't compile. Compilation errors : [INFO] Scanning for projects... |
rohit commented Is there a timeline for this functionality to be released ? |
Mohsin Husen commented we have working (compile + test) branch at https://github.com/spring-projects/spring-data-elasticsearch/tree/DATAES-211-ES2.0 hopefully in a week or so we will merge this to master. |
Johannes Unterstein commented Gorgeous! :-) |
tC commented Waiting passionately :) |
Bruno Domenici commented Me toooo |
Augusto David Altman Quaranta commented Me too :D |
Milan Agatonovic commented And me too :) |
Raunak Gupta commented Exciting! :D |
Mohsin Husen commented code is merged with master. can be tested using adding below dependency <dependency> |
Bruno Domenici commented Thanks a lot. I've updated references in my project and now I got this error: 11:20:22.676 [main] ERROR o.s.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@10612ba] to prepare test instance [xxx@1f34b70] Should I change anything in my configuration? |
Joseph Moore commented So I had found a bug with the config loading in the DATAES-211-ES-2.0 branch that causes any config inside a jar to fail to load, which breaks multi-level maven builds. I had made a simple 1-line PR to fix this issue against that branch (see #136), but the fix was never merged. Do I need to open this a a new ticket/new PR or what can we do if there is a known issue with this already? The project is unusable for my company's use without this bugfix, so this is a major priority that I don't want to see having to wait on another release when the bug was clear before the branch was even merged into master. |
Joseph Moore commented Made a new bug ticket to track the config issue I mentioned above with the merged code. |
Christophe Mohimont commented I have test yesterday. It works perfectly for me with Elasticsearch 2. Thanks for your work :) |
Johannes Unterstein commented I upgraded today and it works perfectly for me as well! Thank you very much :) |
rohit commented I am unable to run this build with spring boot 1.3.2 and 1.4.0.BUILD-SNAPSHOT. The error is java.lang.RuntimeException: java.lang.reflect.InvocationTargetException |
Christophe Mohimont commented It's because you don't have snapshot version of spring-data-commons. For fix this problem, in my pom.xml, I have add this properties: <springdata.commons>1.12.0.BUILD-SNAPSHOT</springdata.commons> and if you analyze your dependencies, you have probably bad version of elasticsearch. If true, add this in you pom properties: <elasticsearch.version>2.2.0</elasticsearch.version> |
Christophe Mohimont commented Oups, I have forgot. I have also add custom ElasticsearchConfig class: @Configuration
@EnableConfigurationProperties(ElasticsearchProperties.class)
public class ElasticSearchConfig implements DisposableBean {
@Autowired
private ElasticsearchProperties properties;
private Releasable releasable;
@Bean
public Client elasticSearchClient() throws Exception {
TransportClientFactoryBean factory = new TransportClientFactoryBean();
factory.setClusterNodes(properties.getClusterNodes());
factory.setProperties(createProperties());
factory.afterPropertiesSet();
TransportClient transportClient = factory.getObject();
releasable = transportClient;
return transportClient;
}
private Properties createProperties() {
Properties properties = new Properties();
properties.put("cluster.name", this.properties.getClusterName());
properties.putAll(this.properties.getProperties());
return properties;
}
@Override
public void destroy() throws Exception {
releasable.close();
}
} and instead of using SpringBootApplication annotation, I have replaced by this: @Configuration
@EnableAutoConfiguration(exclude = ElasticsearchAutoConfiguration.class)
@ComponentScan |
rohit commented WHich Spring Boot version are you suing spring boot 1.3.2 or 1.4.0.BUILD-SNAPSHOT ? |
Christophe Mohimont commented Spring Boot 1.3.2 but I have force to use spring data in BUILD Snapshot like explain above |
Shiv Prakash commented Hi, It is possible to cut out a RC1 release build for Spring Data ES with elastic search 2.0 ? I want to use Spring Data Elastic in my Spring Web project and the release plugin won't allow the release build from a SNAPSHOT build. I believe the framework is quite good and have a few idea of pull requests. I wanted to incorporate this is major release of my new app and could easily update once the RELEASE is available . I have used the below until now for my code. <dependency> I am quite hopeful which in otherwise I have to plan to write a custom using native client. Thanks |
Shiv Prakash commented Just saw the https://github.com/spring-projects/spring-data-commons/wiki/Release-Train-Hopper Thanks |
Vallab Chandrasekaran commented Hi, Can you please let me know the Spring-Data-Commons + Spring jars dependency for this version of Spring-Data-ES jar? Also, I see there is a spring compatibility matrix in this thread. But the matrix is not updated to date. Can you please point to the latest matrix? Thanks, |
Vallab Chandrasekaran commented The same matrix is also found in the spring forum thread below and it is also not "Up To Date". Please update. http://forum.spring.io/forum/spring-projects/container/743821-spring-version-matrix-of-components Thanks, |
Nikolay Gorylenko commented
i'm still getting
on spring-boot 1.3.3, spring-data-commons:1.12.0.RC1, spring-boot-autoconfigure:1.4.0.BUILD-SNAPSHOT have
but this does not help to avoid reading of ElasticsearchAutoConfiguration |
Mihir Pandya commented When will this be supported through spring boot autoconfigure? |
Utkarsh Mishra commented Getting this error on including 2.0.1.RELEASE with ES 2.2.0. Exception in thread "main" java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration.elasticsearchClient
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:58)
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at com.snapdeal.treasure.search.application.Application.main(Application.java:21)
Caused by: java.lang.IllegalArgumentException: @ConditionalOnMissingBean annotations must specify at least one bean (type, name or annotation)
at org.springframework.util.Assert.isTrue(Assert.java:65)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition$BeanSearchSpec.<init>(OnBeanCondition.java:223)
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:92)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45)
... 16 more |
Adi K commented I have Spring boot 1.2.3, and ES 2.0. I have the following dependencies in my build.gradle: dependencies { My configuration class looks as follows:
} I get the following exception: java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories.repositoryBaseClass() |
Thiago Locatelli commented My pom.xml configuration Spring Boot version: 1.3.5.RELEASE Getting the same issue |
Jérémie HAREL commented Hello, |
Artur Konczak commented Hi All |
Christoph Strobl opened DATAES-211 and commented
Upgrade to ES 2.0
The upgrade might require the following and requires some investigation.
QueryBuilder
counterparts.There's quite a bit to change through out the whole API which makes me think that this upgrade might require a major version bump.
I've a draft implementation at hand removing the compile errors and making sure the node client starts up. The draft is far from perfect and deals only with some parts of the above mentioned throwing
UnsupportedOperationException
on those I could not solve quickly - let me know if you want to have a look, in that case I can clean things up a bit and provide you with the branch39 votes, 47 watchers
The text was updated successfully, but these errors were encountered: