Class AbstractElasticsearchSink
- java.lang.Object
-
- io.annot8.common.components.AbstractComponent
-
- io.annot8.common.components.AbstractProcessor
-
- io.annot8.components.elasticsearch.processors.AbstractElasticsearchSink
-
- All Implemented Interfaces:
io.annot8.api.components.Annot8Component,io.annot8.api.components.Processor,AutoCloseable
- Direct Known Subclasses:
AnnotationElasticsearchSink.Processor,ContentElasticsearchSink.Processor,GroupElasticsearchSink.Processor,ItemElasticsearchSink.Processor,NestedElasticsearchSink.Processor
public abstract class AbstractElasticsearchSink extends io.annot8.common.components.AbstractProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected org.elasticsearch.client.RestHighLevelClientclientprotected booleanforceStringprotected Stringindex
-
Constructor Summary
Constructors Constructor Description AbstractElasticsearchSink(ElasticsearchSettings settings)AbstractElasticsearchSink(List<org.apache.http.HttpHost> hosts, String index, boolean deleteIndex, boolean forceString)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()protected Optional<Map<String,Object>>getMapping()protected abstract List<org.elasticsearch.action.index.IndexRequest>itemToIndexRequests(io.annot8.api.data.Item item)io.annot8.api.components.responses.ProcessorResponseprocess(io.annot8.api.data.Item item)
-
-
-
Field Detail
-
client
protected final org.elasticsearch.client.RestHighLevelClient client
-
index
protected final String index
-
forceString
protected final boolean forceString
-
-
Constructor Detail
-
AbstractElasticsearchSink
public AbstractElasticsearchSink(ElasticsearchSettings settings)
-
-
Method Detail
-
close
public void close()
-
process
public io.annot8.api.components.responses.ProcessorResponse process(io.annot8.api.data.Item item)
-
itemToIndexRequests
protected abstract List<org.elasticsearch.action.index.IndexRequest> itemToIndexRequests(io.annot8.api.data.Item item)
-
-