All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.polyglotted.elastic.search.ResponseBuilder Maven / Gradle / Ivy

There is a newer version: 6.8.5
Show newest version
package io.polyglotted.elastic.search;

import io.polyglotted.elastic.common.Verbose;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.search.SearchResponse;

import java.util.List;

import static io.polyglotted.common.util.CollUtil.transform;

public interface ResponseBuilder {
    List buildFrom(SearchResponse response, Verbose verbose);

    @SuppressWarnings("unused") ResponseBuilder DeleteReqBuilder = (resp, v) -> transform(resp.getHits(),
        h -> new DeleteRequest(h.getIndex(), h.getType(), h.getId())).toList();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy