IndexableDataProviderEngineLayer

interface IndexableDataProviderEngineLayer

Provides a mechanism for search index changes in core layers. One core layer can be associated with several search engines.

Please note that even though in most cases execution of each operation is pretty fast, in some cases (when core layer is currently used by search engine or when >10000 records are being added) execution may take some time. Please, consider usage of this class from background thread.

Types

BatchUpdateOperation
Link copied to clipboard
fun fun interface BatchUpdateOperation
Interface definition for a function to be executed atomically during IndexableDataProviderEngineLayer update.

Functions

add
Link copied to clipboard
abstract fun add(record: IndexableRecord)
Adds IndexableRecord to search index.
addAll
Link copied to clipboard
abstract fun addAll(records: Iterable<IndexableRecord>)
Adds a bunch of IndexableRecord to search index.
clear
Link copied to clipboard
abstract fun clear()
Clears the whole search index.
executeBatchUpdate
Link copied to clipboard
abstract fun executeBatchUpdate(batchUpdateOperation: IndexableDataProviderEngineLayer.BatchUpdateOperation)
Atomically executes all operations on engine layer.
remove
Link copied to clipboard
abstract fun remove(id: String)
Removes IndexableRecord with specified id from search index.
removeAll
Link copied to clipboard
abstract fun removeAll(ids: Iterable<String>)
Removes a bunch of IndexableRecord with specified ids from search index.
update
Link copied to clipboard
abstract fun update(record: IndexableRecord)
Updates IndexableRecord in search index.