public class ElasticSearchRestDataContext extends QueryPostprocessDataContext implements DataContext, UpdateableDataContext
SimpleTableDef class.| Modifier and Type | Field and Description |
|---|---|
static String |
FIELD_ID |
static String |
TIMEOUT_SCROLL |
INFORMATION_SCHEMA_NAME| Constructor and Description |
|---|
ElasticSearchRestDataContext(io.searchbox.client.JestClient client,
String indexName)
Constructs a
ElasticSearchRestDataContext and automatically
detects the schema structure/view on all indexes (see
detectTable(JsonObject, String)). |
ElasticSearchRestDataContext(io.searchbox.client.JestClient client,
String indexName,
SimpleTableDef... tableDefinitions)
Constructs a
ElasticSearchRestDataContext. |
| Modifier and Type | Method and Description |
|---|---|
protected Number |
executeCountQuery(Table table,
List<FilterItem> whereItems,
boolean functionApproximationAllowed) |
protected Row |
executePrimaryKeyLookupQuery(Table table,
List<SelectItem> selectItems,
Column primaryKeyColumn,
Object keyValue) |
void |
executeUpdate(UpdateScript update) |
io.searchbox.client.JestClient |
getElasticSearchClient()
Gets the
JestClient that this DataContext is wrapping. |
String |
getIndexName()
Gets the name of the index that this
DataContext is working on. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
protected DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows) |
protected DataSet |
materializeMainSchemaTable(Table table,
List<SelectItem> selectItems,
List<FilterItem> whereItems,
int firstRow,
int maxRows) |
addConverter, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable, materializeTablecompileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemaspublic static final String FIELD_ID
public static final String TIMEOUT_SCROLL
public ElasticSearchRestDataContext(io.searchbox.client.JestClient client,
String indexName,
SimpleTableDef... tableDefinitions)
ElasticSearchRestDataContext. This constructor
accepts a custom array of SimpleTableDefs which allows the user
to define his own view on the indexes in the engine.client - the ElasticSearch clientindexName - the name of the ElasticSearch index to representtableDefinitions - an array of SimpleTableDefs, which define the table
and column model of the ElasticSearch index.public ElasticSearchRestDataContext(io.searchbox.client.JestClient client,
String indexName)
ElasticSearchRestDataContext and automatically
detects the schema structure/view on all indexes (see
detectTable(JsonObject, String)).client - the ElasticSearch clientindexName - the name of the ElasticSearch index to representprotected Schema getMainSchema() throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected String getMainSchemaName() throws MetaModelException
getMainSchemaName in class QueryPostprocessDataContextMetaModelExceptionprotected DataSet materializeMainSchemaTable(Table table, List<SelectItem> selectItems, List<FilterItem> whereItems, int firstRow, int maxRows)
materializeMainSchemaTable in class QueryPostprocessDataContextprotected DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
materializeMainSchemaTable in class QueryPostprocessDataContextprotected Row executePrimaryKeyLookupQuery(Table table, List<SelectItem> selectItems, Column primaryKeyColumn, Object keyValue)
executePrimaryKeyLookupQuery in class QueryPostprocessDataContextprotected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed)
executeCountQuery in class QueryPostprocessDataContextpublic void executeUpdate(UpdateScript update)
executeUpdate in interface UpdateableDataContextpublic io.searchbox.client.JestClient getElasticSearchClient()
JestClient that this DataContext is wrapping.public String getIndexName()
DataContext is working on.Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.