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.HttpClienthttpClientprotected StringopenSearchUrl 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedOpenSearchClient(String openSearchUrl, org.apache.http.client.HttpClient httpClient) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemitDocument(String emitKey, String routing, Metadata metadata)JsonResponsepostJson(String url, String json)voidwriteBulkRequest(String id, String routing, StringWriter writer)voidwriteDoc(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:
 IOExceptionTikaClientException
 
- 
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
 
 - 
 
 -