fast-autocomplete
fast-autocomplete copied to clipboard
How do you handle words data synchronization?
Hi, this question may not be only related to the library itself but the whole system structure.
In real production, the words source may come from search index and user queries, which changed quickly. Imagine some product called nidas
were off shelves minutes ago. The suggestor nid
returns nidas
but the searcher returns no results
.
If you separate the search module and suggest module, how do you make sure that the data are consistent.
Thanks for you time!
Hello @Morriaty-The-Murderer Fast-Autocomplete does not have a live update to the graph feature yet. I have some plans to allow live updates and "syncing" but not implemented it yet.
However a better approach for your problem might be if a user types nid
, whether you have the product or not you should still let them know that you understand what they want by showing nidas
in the autocomplete results. The searcher won't have nidas
exactly but it can show:
- Here are some products similar to
nidas
- Users who searched for
nidas
also searched for X, Y and Z which we do have.
Hope that helps. P.S. Nice username.