seperman / fast-autocomplete

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

How do you handle words data synchronization? #7

Open Morriaty-The-Murderer opened 5 years ago

Morriaty-The-Murderer commented 5 years ago

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!

seperman commented 5 years ago

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:

  1. Here are some products similar to nidas
  2. Users who searched for nidas also searched for X, Y and Z which we do have.

Hope that helps. P.S. Nice username.