Class OpenSearchClient
- java.lang.Object
-
- org.apache.tika.pipes.reporters.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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
emitDocument(String emitKey, String routing, Metadata metadata)
JsonResponse
postJson(String url, String json)
void
writeBulkRequest(String id, String routing, StringWriter writer)
void
writeDoc(Metadata metadata, StringWriter writer)
-
-
-
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)
-
-
Method Detail
-
emitDocument
public void emitDocument(String emitKey, String routing, Metadata metadata) throws IOException, TikaClientException
- Throws:
IOException
TikaClientException
-
postJson
public JsonResponse postJson(String url, String json) throws IOException
- Throws:
IOException
-
writeDoc
public void writeDoc(Metadata metadata, StringWriter writer) throws IOException
- Throws:
IOException
-
writeBulkRequest
public void writeBulkRequest(String id, String routing, StringWriter writer) throws IOException
- Throws:
IOException
-
-