![JAR search and dependency download from the Maven repository](/logo.png)
com.github.euler.elasticsearch.ElasticsearchResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of euler-elasticsearch Show documentation
Show all versions of euler-elasticsearch Show documentation
Euler - File Processing API - Elasticsearch module.
package com.github.euler.elasticsearch;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.elasticsearch.action.bulk.BulkResponse;
import com.github.euler.tika.SinkItemResponse;
import com.github.euler.tika.SinkResponse;
public class ElasticsearchResponse implements SinkResponse {
private final String id;
private final BulkResponse response;
public ElasticsearchResponse(String id, BulkResponse response) {
this.id = id;
this.response = response;
}
@Override
public String getId() {
return id;
}
@Override
public List getResponses() {
return Arrays.stream(response.getItems())
.map((item) -> new ElasticsearchItemResponse(item))
.collect(Collectors.toList());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy