Hi David,
I have used these two tags in applicationcontext.xml
<elasticsearch:client id="esClient" />
<elasticsearch:client node="esNode" id="esClient" />
i am getting this log..
18:08:50,265 DEBUG [ElasticsearchNodeFactoryBean] Starting ElasticSearch node...
18:08:52,843 INFO [ElasticsearchNodeFactoryBean] Node [junit.node] for [junit.cluster] cluster started...
18:08:52,843 DEBUG [ElasticsearchNodeFactoryBean] - data : /es/twitter
18:08:52,843 DEBUG [ElasticsearchNodeFactoryBean] - logs : D:/ProgramFiles/Apache Software Foundation/Tomcat 5.5/logs
18:08:52,875 INFO [ElasticsearchClientFactoryBean] Starting ElasticSearch client
18:08:52,875 DEBUG [ElasticsearchClientFactoryBean] Automatic discovery is activated. Looking for definition files in classpath under /es.
18:08:52,875 DEBUG [ElasticsearchClientFactoryBean] Automatic discovery found twitter/tweet json file in classpath under /es.
18:08:52,890 TRACE [ElasticsearchClientFactoryBean] createIndex(twitter)
18:08:52,890 DEBUG [ElasticsearchClientFactoryBean] Index twitter doesn't exist. Creating it.
18:08:52,890 TRACE [ElasticsearchClientFactoryBean] Found settings for index twitter : { "index" : { "number_of_shards" : 3, "number_of_replicas" : 2 }}
18:08:53,593 TRACE [ElasticsearchClientFactoryBean] /createIndex(twitter)
18:08:53,593 TRACE [ElasticsearchClientFactoryBean] pushMapping(twitter,tweet,false)
18:08:53,593 DEBUG [ElasticsearchClientFactoryBean] Mapping [twitter]/[tweet] doesn't exist. Creating it.
18:08:53,593 TRACE [ElasticsearchClientFactoryBean] Mapping for [twitter]/[tweet]={ "tweet" : { "properties" : { "message" : {"type" : "string", "store" : "yes"} } }}
18:08:53,953 DEBUG [ElasticsearchClientFactoryBean] Mapping definition for [twitter]/[tweet] succesfully created.
18:08:53,953 TRACE [ElasticsearchClientFactoryBean] /pushMapping(twitter,tweet,false)
18:08:56,937 ERROR [DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'esNode' defined in class path resource [com/newwave/dc/elasticsearch/annotation/AppConfig.class]: No matching factory method found: factory bean 'appConfig'; factory method 'esNode()'. Check that a method with the specified name exists and that it is non-static.
this is AppConfig Class
@Configuration
public class AppConfig {
@Bean
public Node esNode() throws Exception {
ElasticsearchNodeFactoryBean factory = new ElasticsearchNodeFactoryBean();
factory.afterPropertiesSet();
return factory.getObject();
}
@Bean
public Client esClient() throws Exception {
ElasticsearchClientFactoryBean factory = new ElasticsearchClientFactoryBean();
factory.setNode(esNode());
factory.afterPropertiesSet();
return factory.getObject();
}
}
is there any mixing things?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.