@Test public void testDelByQuery() { try { Query query = Query.bool(Query.term("tbool", "false"), null, null); esService.deleteByQuery(index, type, query); } catch (Exception e) { LOG.error(e.getMessage(), e); fail(); } }
public DeleteByQueryResult deleteByQuery(String index, String type, Query query) throws HttpException { DeleteByQuery action = esHelper.deleteByQuery(index, type); action.setBody(new JsonObj("query", query)); return esHelper.post(action, DeleteByQueryResult.class); }
EsBaseService { public DeleteByQueryResult deleteByQuery(String index, String type, Query query) throws HttpException { DeleteByQuery action = esHelper.deleteByQuery(index, type); action.setBody(new JsonObj("query", query)); return esHelper.post(action, DeleteByQueryResult.class); } }
EsBaseService { public DeleteByQueryResult deleteByQuery(String index, String type, Query query) throws HttpException { DeleteByQuery action = esHelper.deleteByQuery(index, type); action.setBody(new JsonObj("query", query)); return esHelper.post(action, DeleteByQueryResult.class); } EsBaseService(); }
EsBaseService { public DeleteByQueryResult deleteByQuery(String index, String type, Query query) throws HttpException { DeleteByQuery action = esHelper.deleteByQuery(index, type); action.setBody(new JsonObj("query", query)); return esHelper.post(action, DeleteByQueryResult.class); } EsBaseService(); void init(String server, OkHttpClient client, IConvert convert); Object getMapping(String index); Object getMapping(String index, String type); Object putMapping(String index, String type, Object mapping); Object getIndex(String index); Object putIndexSettings(String index, Object settings); Object index(String index, String type, Object body); Object index(String index, String type, String id, Object body); Object get(String index, String type, String id); boolean delIndex(String index); Object openIndex(String index); Object closeIndex(String index); Object syncedFlushIndex(String index); Object flushIndex(String index); JsonObjGetter bulkUpdate(String index, String type, List<Object> allDoc, int retry_on_conflict); @SuppressWarnings("unchecked") T get(String index, String type, String id, Class<T> cls); @SuppressWarnings("unchecked") WSearchResult<T> searchObj(String index, String type, SearchQuery queryDSL, Class<T> cls); WPageIterator<T> search(String index, String type, SearchQuery queryDSL, Class<T> cls); Object indicesPutAlias(String index, String alias); boolean indicesDeleteAlias(String index, String alias); boolean hasIndex(String index); boolean hasIndexAlias(String index, String name); Set<String> getIndexTypes(String index); Set<String> getAllIndex(); Object createIndex(String index, int number_of_shards, int number_of_replicas); void reIndex(String oldIndex, String newIndex, boolean keepVersion); boolean delete(String index, String type, String id); DeleteByQueryResult deleteByQuery(String index, String type, Query query); T save(T doc); T index(T doc); T get(T doc); boolean delete(IEsItem doc); }
EsBaseService { public DeleteByQueryResult deleteByQuery(String index, String type, Query query) throws HttpException { DeleteByQuery action = esHelper.deleteByQuery(index, type); action.setBody(new JsonObj("query", query)); return esHelper.post(action, DeleteByQueryResult.class); } EsBaseService(); void init(String server, OkHttpClient client, IConvert convert); Object getMapping(String index); Object getMapping(String index, String type); Object putMapping(String index, String type, Object mapping); Object getIndex(String index); Object putIndexSettings(String index, Object settings); Object index(String index, String type, Object body); Object index(String index, String type, String id, Object body); Object get(String index, String type, String id); boolean delIndex(String index); Object openIndex(String index); Object closeIndex(String index); Object syncedFlushIndex(String index); Object flushIndex(String index); JsonObjGetter bulkUpdate(String index, String type, List<Object> allDoc, int retry_on_conflict); @SuppressWarnings("unchecked") T get(String index, String type, String id, Class<T> cls); @SuppressWarnings("unchecked") WSearchResult<T> searchObj(String index, String type, SearchQuery queryDSL, Class<T> cls); WPageIterator<T> search(String index, String type, SearchQuery queryDSL, Class<T> cls); Object indicesPutAlias(String index, String alias); boolean indicesDeleteAlias(String index, String alias); boolean hasIndex(String index); boolean hasIndexAlias(String index, String name); Set<String> getIndexTypes(String index); Set<String> getAllIndex(); Object createIndex(String index, int number_of_shards, int number_of_replicas); void reIndex(String oldIndex, String newIndex, boolean keepVersion); boolean delete(String index, String type, String id); DeleteByQueryResult deleteByQuery(String index, String type, Query query); T save(T doc); T index(T doc); T get(T doc); boolean delete(IEsItem doc);  }