Keywords suggestion expansion

Let’s say that I have documents with keywords. I want users to find documents based on keywords search using searchableParameter(keywords.value). I also want to suggest keywords sequence as an autocomplete feature. For example, having indexed this document:

  objectID: 1,
  keywords: [
    {value: 'foo', weight: .9},
    {value: 'bar', weight: .8},

user types ‘fo’, suggests ‘foo’
user types ‘fo ba’, suggests ‘foo bar’

Hi @sandbot,

To achieve this with Algolia you need a dedicated index that will contain the suggestions you want to display to the user.

There’s an open source project we created called query-suggestions to help you with that. It will analyse your indices and generate query suggestions.

You need to know that for now the project doesn’t respect semantic version yet, and that you’ll need to configure and host the script yourself.

Does this help?

Hi @marielaure.thuret,

Thanks for the quick answer, I’ll try to play with it a bit, but it seams to tackle the problem.