Why DeleteByQuery - ElasticSearch v2.4 java api does not work? -
i have problem, need delete elasticsearch using field _source
.
for can delete es using _id
in case need delete field _source
.
this code:
public void removedocument(string index, string type, string id) { esclient.preparedelete(index, type, id).execute().actionget(); }
and tried doesn't work:
public void removedocumentbyfield(string index, string type, string field, string value){ querybuilder querybuilder = new matchquerybuilder(field, value); new deletebyqueryrequestbuilder(esclient, deletebyqueryaction.instance) .setindices(index) .settypes(type) .setquery(querybuilder) .execute() .actionget(); }
Comments
Post a Comment