Package org.springframework.data.elasticsearch.core.query

Examples of org.springframework.data.elasticsearch.core.query.DeleteQuery


  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);
View Full Code Here


    private ElasticsearchTemplate elasticsearchTemplate;

    @Before
    public void before(){
        elasticsearchTemplate.createIndex(SampleEntity.class);
        DeleteQuery deleteQuery = new DeleteQuery();
        deleteQuery.setQuery(matchAllQuery());
        elasticsearchTemplate.delete(deleteQuery,SampleEntity.class);
        elasticsearchTemplate.refresh(SampleEntity.class, true);
    }
View Full Code Here

TOP

Related Classes of org.springframework.data.elasticsearch.core.query.DeleteQuery

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.