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