I needed to implement autocomplete search box in my android app with Node.js backend but the database is too heavy with many rows. I wanted to search through Android with search keywords. So it is good to fire and API call for every text character that is entered via Android autocomplete text search box. Or something other more efficient logic can be implemented.
Asked
Active
Viewed 116 times
1
-
There is a lot written already about autocomplete logic and many existing implementations all over the web. It would be best if you've read what has already been done before and you ask some question about that relative to your specific use rather than just ask how to do auto-complete from scratch. Usually, there's a time delay and the characters are only sent to the server after some short period of time with no new characters typed. This prevents firing on every character when the user is just typing. There are many ways to micro-optimize this for specific situations. – jfriend00 Aug 29 '16 at 05:38
-
Some discussion of server-side logic for auto-complete: [Algorithm for auto-complete](http://stackoverflow.com/questions/2901831/algorithm-for-autocomplete). – jfriend00 Aug 29 '16 at 05:40