CustomSearchDataProvider

Enables injection of custom search data to the search engine.

Important: This is a Public Preview API. It may be changed or removed at any time.

Functions

Link copied to clipboard
abstract fun close()
Link copied to clipboard
abstract fun getRecords(): Result<Set<T>, SearchFailure>

Synchronously get the collection of CustomRecords previously set in the CustomSearchDataProvider.

Asynchronously get the collection of CustomRecords previously set in the CustomSearchDataProvider.

Link copied to clipboard
abstract fun setRecords(records: Set<T>): Result<Unit, SearchFailure>

Synchronously sets a collection of CustomRecords in the CustomSearchDataProvider. It replaces any existing custom data. This data can then be taken into consideration for any subsequent search operations.

abstract fun setRecords(records: Set<T>, callback: SetCustomRecordsCallback): Cancellable

Asynchronously sets a collection of CustomRecords in the CustomSearchDataProvider. It replaces any existing custom data. This data can then be taken into consideration for any subsequent search operations.

Properties

Link copied to clipboard
abstract val name: String

Data provider name. This uniquely identifies a custom data provider. Because CustomRecord.id must then be unique within the provider, the combination of name and CustomRecord.id is a unique reference to a custom data record.