Examples of ElasticsearchTemplate


Examples of org.springframework.data.elasticsearch.core.ElasticsearchTemplate

  @Produces
  public ElasticsearchOperations createElasticsearchTemplate() throws IOException, ParserConfigurationException, SAXException {
    ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder().put("http.enabled", "false");
    NodeClient client = (NodeClient) nodeBuilder().settings(settings).clusterName("testClusterForCDI").local(true).node()
        .client();
    return new ElasticsearchTemplate(client);
  }
View Full Code Here

Examples of org.springframework.data.elasticsearch.core.ElasticsearchTemplate

  @EnableElasticsearchRepositories(basePackages = "org.springframework.data.elasticsearch.repositories.sample")
  static class Config {

    @Bean
    public ElasticsearchOperations elasticsearchTemplate() {
      return new ElasticsearchTemplate(nodeBuilder().local(true).clusterName("testCluster2").node().client());
    }
View Full Code Here

Examples of org.springframework.data.elasticsearch.core.ElasticsearchTemplate

public class ElasticsearchDataAutoConfiguration {

  @Bean
  @ConditionalOnMissingBean
  public ElasticsearchTemplate elasticsearchTemplate(Client client) {
    return new ElasticsearchTemplate(client);
  }
View Full Code Here

Examples of org.springframework.data.elasticsearch.core.ElasticsearchTemplate

    @EnableElasticsearchRepositories(basePackages = "org.springframework.data.elasticsearch.repositories")
    static class Config {

        @Bean
        public ElasticsearchOperations elasticsearchTemplate() {
            return new ElasticsearchTemplate(nodeBuilder().local(true).node().client());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.