SearchManager
Search engine. Main entry point for the reference API.
ru.dgis.sdk.NativeObject
fun suggest(query: SuggestQuery): Future<SuggestResult>
Get suggestions matching the given query.
query
Future<SuggestResult>
Future that resolves into a non-null pointer to the result of suggestion or exceptional future if an error occurs while getting suggestions.
fun search(query: SearchQuery): Future<SearchResult>
Get directory objects matching the given query.
query
Future<SearchResult>
Future that resolves into a non-null pointer to the search result or exceptional future if an error occurs while getting the search results.
fun searchById(id: String): Future<DirectoryObject?>
Get the reference object by a string identifier.
id
Future<DirectoryObject?>
Future that resolves into a pointer to a reference object. If the object is not found, a null pointer is returned.
fun searchByDirectoryObjectId(objectId: DgisObjectId): Future<DirectoryObject?>
Get the reference object by an identifier.
objectId
Future<DirectoryObject?>
Future that resolves into a pointer to a reference object. If the object is not found, a null pointer is returned.
@JvmStatic
fun createOnlineManager(context: Context): SearchManager
Create an online search engine.
@JvmStatic
fun createOfflineManager(context: Context): SearchManager
Create a search engine that works with preloaded data.
@JvmStatic
fun createSmartManager(context: Context): SearchManager
Create a search engine that works online or with preloaded data depending on presence of Internet connection.