seperman / fast-autocomplete

Fast Autocomplete: When Elastcsearch suggestions are not fast and flexible enough
MIT License
272 stars 40 forks source link

Increasing count in real time #11

Closed rishi7 closed 4 years ago

rishi7 commented 4 years ago

Hi,

What is the best way to increase the count for the word? I want dynamic way of rearranging sorting based on which of the suggested value was clicked. Is calling autocomplete .insert_word_branch(...) with new count the best way to do that?

seperman commented 4 years ago

Hi @rishi7 Let me see if I understand your question. Every time that someone clicks on an item from the suggested results of Fast Autocomplete, you want to give a boost to that item. And do you want to boost it for everyone or only that specific user who clicked on the item?

Currently Fast Autocomplete has one global state and does not allow boosting just for one user. It is gonna be boosted for all users who are dealing with that instance of the Fast Autocomplete. If boosting globally is something you are willing to do, I will explain more how to do it.

rishi7 commented 4 years ago

Currently, boosting on global level would do.

seperman commented 4 years ago

Hi @rishi7 I just released a Fast Autocomplete 0.6.0. Please read here on the instruction to update the count live: https://github.com/wearefair/fast-autocomplete#change-the-sorting-by-updating-counts