search
Searches the document with the given query. This function will update the search state associated with this SearchActions object in the DocumentController. (e.g. calling DocumentController.textSearch.actions.search(query) will emit to the StateFlow of DocumentController.textSearch).
If the results are used to feed a UI, it's recommended to call this function from Dispatchers.Main, otherwise jetpack compose might throw an java.lang.IllegalStateException when accessing the state to update the UI.
The actual search runs always in the background on Dispatchers.Default, though.
Parameters
query
The query to search for