Class OpenSearchClient
- java.lang.Object
-
- org.apache.tika.pipes.emitter.opensearch.OpenSearchClient
-
public class OpenSearchClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.client.HttpClient
httpClient
protected String
openSearchUrl
-
Constructor Summary
Constructors Modifier Constructor Description protected
OpenSearchClient(String openSearchUrl, org.apache.http.client.HttpClient httpClient, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, OpenSearchEmitter.UpdateStrategy updateStrategy, String embeddedFileFieldName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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)
JsonResponse
postJson(String url, String json)
-
-
-
Field Detail
-
openSearchUrl
protected final String openSearchUrl
-
httpClient
protected final org.apache.http.client.HttpClient httpClient
-
-
Constructor Detail
-
OpenSearchClient
protected OpenSearchClient(String openSearchUrl, org.apache.http.client.HttpClient httpClient, OpenSearchEmitter.AttachmentStrategy attachmentStrategy, OpenSearchEmitter.UpdateStrategy updateStrategy, String embeddedFileFieldName)
-
-
Method Detail
-
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
public JsonResponse postJson(String url, String json) throws IOException
- Throws:
IOException
-
-