0

I'm currently using Elasticsearch with Vue.js and I added a search bar so when I search words it showed me what I want but when I search "usa" it go on and off for earch letter it's not fluid.

Do you have any ideas to what I have to use to solve this problem?

Thank you.

2 Answers2

0

Try to use something like the Throttle function in Lodash or any other similar library. If you don't want to use another library you could see this other question here on S.O. : Simple throttle in js

This will prevent to call the search for every time your type, waiting a few milliseconds before firing the call, avoiding consecutives requests avoiding that flickering behavior.

Cassio Cabral
  • 2,652
  • 3
  • 23
  • 37
0

There is a serious and complete library simplifying building great search UIs for ElasticSearch using Vue.js vue-innersearch

TrimA
  • 1
  • 1