public final class ElasticsearchConnection extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
static int |
ELASTICSEARCH_DEFAULT_PORT |
Constructor and Description |
---|
ElasticsearchConnection(Config config) |
Modifier and Type | Method and Description |
---|---|
org.elasticsearch.client.Client |
client() |
void |
close() |
void |
closeIndex(TargetIndexConfig ticonf,
String realIndexName,
boolean cleanShutdown)
Closes the index after harvesting and update the aliases to point to the active index.
|
String |
createIndex(TargetIndexConfig ticonf,
boolean rebuilder)
Creates the index (if needed), configures it (mapping), and creates aliases.
|
DocumentProcessor |
getDocumentProcessor(HarvesterConfig iconfig,
String targetIndex) |
void |
updateAliases(TargetIndexConfig ticonf)
Closes the index after harvesting and update the aliases to point to the active index.
|
void |
waitForYellow(TargetIndexConfig ticonf) |
public static final int ELASTICSEARCH_DEFAULT_PORT
public ElasticsearchConnection(Config config)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public org.elasticsearch.client.Client client()
public DocumentProcessor getDocumentProcessor(HarvesterConfig iconfig, String targetIndex)
public void waitForYellow(TargetIndexConfig ticonf)
public String createIndex(TargetIndexConfig ticonf, boolean rebuilder)
public void closeIndex(TargetIndexConfig ticonf, String realIndexName, boolean cleanShutdown)
public void updateAliases(TargetIndexConfig ticonf)
Copyright ©2007-2013 panFMP Developers c/o Uwe Schindler