public class ElasticIndexWriter extends Object implements IndexWriter
X_POINT_ID| Constructor and Description |
|---|
ElasticIndexWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected BulkProcessor.Listener |
bulkProcessorListener()
Generates a default BulkProcessor.Listener
|
void |
close() |
void |
commit() |
void |
delete(String key) |
Map<String,Map.Entry<String,Object>> |
describe()
Returns
Map with the specific parameters the IndexWriter instance
can take. |
Configuration |
getConf() |
protected RestHighLevelClient |
makeClient(IndexWriterParams parameters)
Generates a RestHighLevelClient with the hosts given
|
void |
open(Configuration conf,
String name) |
void |
open(IndexWriterParams parameters)
Initializes the internal variables from a given index writer configuration.
|
void |
setConf(Configuration conf) |
void |
update(NutchDocument doc) |
void |
write(NutchDocument doc) |
public void open(Configuration conf, String name) throws IOException
open in interface IndexWriterIOExceptionpublic void open(IndexWriterParams parameters) throws IOException
open in interface IndexWriterparameters - Params from the index writer configuration.IOException - Some exception thrown by writer.protected RestHighLevelClient makeClient(IndexWriterParams parameters) throws IOException
IOExceptionprotected BulkProcessor.Listener bulkProcessorListener()
public void write(NutchDocument doc) throws IOException
write in interface IndexWriterIOExceptionpublic void delete(String key) throws IOException
delete in interface IndexWriterIOExceptionpublic void update(NutchDocument doc) throws IOException
update in interface IndexWriterIOExceptionpublic void commit()
throws IOException
commit in interface IndexWriterIOExceptionpublic void close()
throws IOException
close in interface IndexWriterIOExceptionpublic Map<String,Map.Entry<String,Object>> describe()
Map with the specific parameters the IndexWriter instance
can take.describe in interface IndexWriterpublic void setConf(Configuration conf)
setConf in interface Configurablepublic Configuration getConf()
getConf in interface ConfigurableCopyright © 2021 The Apache Software Foundation