Go and reach to the server for every character typed by the user & get the results accordingly.
Get the results from the Elastic Search Server when the user typed first character and then filter it in the client side for any upcoming expressions. Example, If user types letter I, reach to server & get the results back. Server gives everything starting with letter I, secondly if user types characters IO, don’t go to server. Just filter it in the client side with the results given back by the server.
you could go with option 1 … but … only send the query after like 10 milliseconds after the user stopped typing. So this way you can still reduce the amount of server calls
Option 2 … it’s a nice idea … it might work, but if the server is to occupied or you have A LOT of words starting with I … the user has to wait.
Or maybe you can combine option 1 (with the miliseconds wait) with option 2
Option 2 means get the whole dataset from the server? That sounds impractical.
I think option 1 (incremental search with multiple roundtrips to the server) is the only practical way, but i would use Debounce on the model options, e.g:
ok I m happy for the response back @leob@coreelements. what would be the right approach to create indexes in elastic search server? My words are in different backend. If I add new set of words to that backend, how to sync words between db and elastic search server?