Interface ElasticSearchDataSetDefBuilder<T extends DataSetDefBuilder>
-
- All Superinterfaces:
DataSetDefBuilder<T>
public interface ElasticSearchDataSetDefBuilder<T extends DataSetDefBuilder> extends DataSetDefBuilder<T>
A builder for defining ElasticSearch data setsDataSetDef dataSetDef = DataSetDefFactory.newElasticSearchDataSetDef() .uuid("all_employees") .serverURL("localhost:9300") .index("index1") .type("type1") .query("DSL query here") .relevance("10") .buildDef();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TcacheOn(boolean synced, int maxRowsInCache)Enables the static cacheTclusterName(String clusterName)Set the ElasticSearch cluster name.Tindex(String index)Set the name of the index that this dataset will handle.Tquery(String query)Set a custom query to extract the data from ElasticSearch server, instead of manually settingindexandtypeparameters.Trelevance(String relevance)Set the minimum relevance value for resulting search documents.TserverURL(String serverURL)Set the ElasticSearch server instance URL.Ttype(String type)Set the type of the given index/es that this dataset will handle.
-
-
-
Method Detail
-
serverURL
T serverURL(String serverURL)
Set the ElasticSearch server instance URL.
- Parameters:
serverURL- The URL for the ElasticSearch server instance.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
clusterName
T clusterName(String clusterName)
Set the ElasticSearch cluster name.
- Parameters:
clusterName- The cluster name.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
index
T index(String index)
Set the name of the index that this dataset will handle.
This DataSet definition supports working with multiple indexes, so this method can be invoked several times.
- Parameters:
index- The index name- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
type
T type(String type)
Set the type of the given index/es that this dataset will handle.
This DataSet definition supports working with multiple types, so this method can be invoked several times.
If there is no
indexconfigured, the type is skipped.- Parameters:
type- The type of the given index/es- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
query
T query(String query)
Set a custom query to extract the data from ElasticSearch server, instead of manually setting
indexandtypeparameters.This parameter is only used if there are no
indexandtypeparameters already configured.- Parameters:
query- The DSL query to perform for data extraction.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
relevance
T relevance(String relevance)
Set the minimum relevance value for resulting search documents.
If a document relevance value is less than the configured using this method, the document will be present in the dataset.
- Parameters:
relevance- The minimum relevance value- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
cacheOn
T cacheOn(boolean synced, int maxRowsInCache)
Enables the static cache- Parameters:
synced- For keeping the cache synced with the remote database content. If false, the cached content will get never updated once read.maxRowsInCache- Max. rows the cache is able to handle. For higher values the cache is automatically disabled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
-