Search in sources :

Example 1 with DeleteResponse

use of org.opensearch.action.delete.DeleteResponse in project fess by codelibs.

the class EsAbstractBehavior method delegateDelete.

@Override
protected int delegateDelete(final Entity entity, final DeleteOption<? extends ConditionBean> option) {
    final EsAbstractEntity esEntity = (EsAbstractEntity) entity;
    final DeleteRequestBuilder builder = createDeleteRequest(esEntity);
    final DeleteResponse response = builder.execute().actionGet(deleteTimeout);
    return response.getResult() == Result.DELETED ? 1 : 0;
}
Also used : DeleteRequestBuilder(org.opensearch.action.delete.DeleteRequestBuilder) DeleteResponse(org.opensearch.action.delete.DeleteResponse)

Example 2 with DeleteResponse

use of org.opensearch.action.delete.DeleteResponse in project fess by codelibs.

the class EsAbstractBehavior method delegateDelete.

@Override
protected int delegateDelete(final Entity entity, final DeleteOption<? extends ConditionBean> option) {
    final EsAbstractEntity esEntity = (EsAbstractEntity) entity;
    final DeleteRequestBuilder builder = createDeleteRequest(esEntity);
    final DeleteResponse response = builder.execute().actionGet(deleteTimeout);
    return response.getResult() == Result.DELETED ? 1 : 0;
}
Also used : DeleteRequestBuilder(org.opensearch.action.delete.DeleteRequestBuilder) DeleteResponse(org.opensearch.action.delete.DeleteResponse)

Example 3 with DeleteResponse

use of org.opensearch.action.delete.DeleteResponse in project fess by codelibs.

the class EsAbstractBehavior method delegateDelete.

@Override
protected int delegateDelete(final Entity entity, final DeleteOption<? extends ConditionBean> option) {
    final EsAbstractEntity esEntity = (EsAbstractEntity) entity;
    final DeleteRequestBuilder builder = createDeleteRequest(esEntity);
    final DeleteResponse response = builder.execute().actionGet(deleteTimeout);
    return response.getResult() == Result.DELETED ? 1 : 0;
}
Also used : DeleteRequestBuilder(org.opensearch.action.delete.DeleteRequestBuilder) DeleteResponse(org.opensearch.action.delete.DeleteResponse)

Aggregations

DeleteRequestBuilder (org.opensearch.action.delete.DeleteRequestBuilder)3 DeleteResponse (org.opensearch.action.delete.DeleteResponse)3