search

abstract fun search(query: String, searchCriteria: SearchCriteria, searchListener: Search.ISearchListener<List<Any>>? = null)

Initiates a search operation with the specified query and search criteria. This method implements a delay of 500ms between consecutive calls to avoid overloading the server. If the method is called again within the 500ms delay period, the previous search task is cancelled.

The results list is continuously updated as soon as API returns results. Developers can subscribe to events on the list to receive real-time notifications. Once the different searches have been completed, the onSuccess method (or onError if applicable) of the listener is invoked.

Parameters

query

The search query to be executed.

searchCriteria

The criteria to apply for the search operation.

searchListener

An optional listener to receive search results asynchronously. If provided, the listener will be notified when search results are available. The listener should handle a list of results, the type of elements in the list can vary depending on the search operation.

Samples

com.ale.rainbowsdk.samples.SearchSample