Package org.springframework.data.elasticsearch.core

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


    this.elasticsearchOperationsBean = operations;
  }

  @Override
  protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType, Object customImplementation) {
    ElasticsearchOperations elasticsearchOperations = getDependencyInstance(elasticsearchOperationsBean,
        ElasticsearchOperations.class);
    return new ElasticsearchRepositoryFactory(elasticsearchOperations).getRepository(repositoryType,
        customImplementation);
  }
View Full Code Here


    // remove everything to avoid conflicts with other tests in case server not shut down properly
    deleteAll();
  }

  private void deleteAll() {
    ElasticsearchOperations template;
    try {
      template = createElasticsearchTemplate();
      DeleteQuery deleteQuery = new DeleteQuery();
      deleteQuery.setQuery(QueryBuilders.matchAllQuery());
      deleteQuery.setIndex("test-product-index");
      deleteQuery.setType("test-product-type");
      template.delete(deleteQuery);
    } catch (IOException e) {
      throw new RuntimeException(e);
    } catch (ParserConfigurationException e) {
      throw new RuntimeException(e);
    } catch (SAXException e) {
View Full Code Here

    this.elasticsearchOperationsBean = operations;
  }

  @Override
  protected T create(CreationalContext<T> creationalContext, Class<T> repositoryType) {
        ElasticsearchOperations elasticsearchOperations = getDependencyInstance(elasticsearchOperationsBean, ElasticsearchOperations.class);
    return new ElasticsearchRepositoryFactory(elasticsearchOperations).getRepository(repositoryType);
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.core.ElasticsearchOperations

Copyright © 2018 www.massapicom. 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.