public interface IndexProvider extends IndexInformation
| Modifier and Type | Field and Description |
|---|---|
static char |
REPLACEMENT_CHAR |
| Modifier and Type | Method and Description |
|---|---|
BaseTransactionConfigurable |
beginTransaction(BaseTransactionConfig config)
Returns a transaction handle for a new index transaction.
|
static void |
checkKeyValidity(String key) |
void |
clearStorage()
Clears the index and removes all entries in all stores.
|
void |
clearStore(String storeName)
Clears a single field by removing all its entries.
|
void |
close()
Closes the index
|
boolean |
exists()
Checks whether the index exists.
|
void |
mutate(Map<String,Map<String,IndexMutation>> mutations,
KeyInformation.IndexRetriever information,
BaseTransaction tx)
Mutates the index (adds and removes fields or entire documents)
|
Stream<String> |
query(IndexQuery query,
KeyInformation.IndexRetriever information,
BaseTransaction tx)
Executes the given query against the index.
|
Stream<RawQuery.Result<String>> |
query(RawQuery query,
KeyInformation.IndexRetriever information,
BaseTransaction tx)
Executes the given raw query against the index
|
Number |
queryAggregation(IndexQuery query,
KeyInformation.IndexRetriever information,
BaseTransaction tx,
Aggregation aggregation) |
void |
register(String store,
String key,
KeyInformation information,
BaseTransaction tx)
This method registers a new key for the specified index store with the given data type.
|
void |
restore(Map<String,Map<String,List<IndexEntry>>> documents,
KeyInformation.IndexRetriever information,
BaseTransaction tx)
Restores the index to the state of the primary data store as given in the
documents variable. |
Long |
totals(RawQuery query,
KeyInformation.IndexRetriever information,
BaseTransaction tx)
Executes the given raw query against the index and returns the total hits after specified offset and in limit scope if specified.
|
getFeatures, mapKey2Field, supports, supportsstatic final char REPLACEMENT_CHAR
static void checkKeyValidity(String key)
void register(String store, String key, KeyInformation information, BaseTransaction tx) throws BackendException
store - Index storekey - New key to registerinformation - Information on the key to registertx - enclosing transactionBackendExceptionvoid mutate(Map<String,Map<String,IndexMutation>> mutations, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException
mutations - Updates to the index. First map contains all the mutations for each store. The inner map contains
all changes for each document in an IndexMutation.information - Information on the keys used in the mutation accessible through KeyInformation.IndexRetriever.tx - Enclosing transactionBackendExceptionIndexMutationvoid restore(Map<String,Map<String,List<IndexEntry>>> documents, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException
documents variable. When this method returns, the index records
for the given documents exactly matches the provided data. Unlike mutate(java.util.Map, KeyInformation.IndexRetriever, BaseTransaction)
this method does not do a delta-update, but entirely replaces the documents with the provided data or deletes them if the document content is empty.documents - The outer map maps stores to documents, the inner contains the documents mapping document ids to the document content which is a
list of IndexEntry. If that list is empty, that means this document should not exist and ought to be deleted.information - Information on the keys used in the mutation accessible through KeyInformation.IndexRetriever.tx - Enclosing transactionBackendExceptionNumber queryAggregation(IndexQuery query, KeyInformation.IndexRetriever information, BaseTransaction tx, Aggregation aggregation) throws BackendException
BackendExceptionStream<String> query(IndexQuery query, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException
query - Query to executeinformation - Information on the keys used in the query accessible through KeyInformation.IndexRetriever.tx - Enclosing transactionBackendExceptionIndexQueryStream<RawQuery.Result<String>> query(RawQuery query, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException
query - Query to executeinformation - Information on the keys used in the query accessible through KeyInformation.IndexRetriever.tx - Enclosing transactionBackendExceptionRawQueryLong totals(RawQuery query, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException
query - Query to executeinformation - Information on the keys used in the query accessible through KeyInformation.IndexRetriever.tx - Enclosing transactionBackendExceptionRawQueryBaseTransactionConfigurable beginTransaction(BaseTransactionConfig config) throws BackendException
BackendExceptionvoid close()
throws BackendException
BackendExceptionvoid clearStorage()
throws BackendException
BackendExceptionvoid clearStore(String storeName) throws BackendException
BackendExceptionboolean exists()
throws BackendException
BackendExceptionCopyright © 2012–2023. All rights reserved.