Search functionality to search database tables in android
I have implemented the search functionality using the android search dialog to sea开发者_如何学Pythonrch multiple columns of a table using LIKE query, but search became slow as I have written a query in such a way that every time the text of each field(like the sample fields title, description category etc.) will be searched.
title LIKE "---"OR description LIKE ''---"OR.....category LIKE "---"
OR location LIKE"---"to.
So is there any other way to speed up the functionality..
You mean the automatic suggestions feature that come up when you start typing the search keyword? If you'd be querying the database each time the users enters a key, that will be quite slow. You need to build the words index in advance.
See my reply with a code sample here: How to use QuickSearchBox in my Android application?
精彩评论