Class OpenSearchClient
java.lang.Object
org.apache.tika.pipes.emitter.opensearch.OpenSearchClient
-
Field Summary
Modifier and TypeFieldDescriptionprotected final org.apache.http.client.HttpClient
protected final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
OpenSearchClient
(String openSearchUrl, org.apache.http.client.HttpClient httpClient, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, OpenSearchEmitter.UpdateStrategy updateStrategy, String embeddedFileFieldName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
emitDocument
(String emitKey, List<Metadata> metadataList) void
emitDocuments
(List<? extends EmitData> emitData) protected static String
metadataToJsonContainerInsert
(Metadata metadata, OpenSearchEmitter.AttachmentStrategy attachmentStrategy) protected static String
metadataToJsonEmbeddedInsert
(Metadata metadata, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, String emitKey, String embeddedFileFieldName)
-
Field Details
-
openSearchUrl
-
httpClient
protected final org.apache.http.client.HttpClient httpClient
-
-
Constructor Details
-
OpenSearchClient
protected OpenSearchClient(String openSearchUrl, org.apache.http.client.HttpClient httpClient, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, OpenSearchEmitter.UpdateStrategy updateStrategy, String embeddedFileFieldName)
-
-
Method Details
-
emitDocuments
public void emitDocuments(List<? extends EmitData> emitData) throws IOException, TikaClientException - Throws:
IOException
TikaClientException
-
emitDocument
public void emitDocument(String emitKey, List<Metadata> metadataList) throws IOException, TikaClientException - Throws:
IOException
TikaClientException
-
metadataToJsonContainerInsert
protected static String metadataToJsonContainerInsert(Metadata metadata, OpenSearchEmitter.AttachmentStrategy attachmentStrategy) throws IOException - Throws:
IOException
-
metadataToJsonEmbeddedInsert
protected static String metadataToJsonEmbeddedInsert(Metadata metadata, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, String emitKey, String embeddedFileFieldName) throws IOException - Throws:
IOException
-
postJson
- Throws:
IOException
-