I am exploring the Algolia search suggestion, I am facing an issue that the search suggestion adapter is not getting refreshed when I start typing it keeps on showing the same suggestion, It should show the matching suggestion because I already connected the search view, Is there any extra thing I need to do I followed your documentation regarding Algolia search suggestion
Algolia Search Suggestion For Android
I think the query change listener is conflicting, check the code snippet below
Approach 1 Not Working
searchView.setOnQueryTextFocusChangeListener { _, hasFocus ->
showSuggestions()
showProducts()
}
Approach 2 Not Working
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
override fun onQueryTextSubmit(query: String?): Boolean {
return true
}
override fun onQueryTextChange(newText: String?): Boolean {
showSuggestions()
showProducts()
return true
}
})