How do I achieve a keyword based autocomplete suggestions in Algolia similar to something like Amazon or Google?
I attempted building the autocomplete based on multiple attributes of an Algolia document, however its purpose does not really help me at completing a phrase but it directs me at selecting a specific product.
Click Search features from the menu on the left and then click the Autocomplete tab. Click on the slider to set Enable autocomplete to On. It can take up to 2-4 days for autocompletions tailored to your search engine to start appearing.
Algolia is a great internal search engine tool for big eCommerce platforms, it is one of the best tools in the market. The available features and configurations help the product manager to relevant search results to their customers. Best thing is the results are instant once the integration is done.
Algolia is an AI-powered search and discovery platform for dynamic experiences that helps businesses maximize the speed of search and discovery, while solving the pain of relevance tuning through AI. Accessing the right content or products on websites and apps has never been faster or more intuitive.
Autocomplete predictions reflect real searches that have been done on Google. To determine what predictions to show, our systems look for common queries that match what someone starts to enter into the search box but also consider: The language of the query. The location a query is coming from.
I attempted building the autocomplete based on multiple attributes of an Algolia document, however its purpose does not really help me at completing a phrase but it directs me at selecting a specific product.
If you want to suggest some searches instead of products/objects you can build an index with your searches logs. You can use Algolia's Analytics API + top searches endpoint to get them if you don't have them yet.
You could then store them in a popular_searches
index like that:
{
"value": "my popular search",
"count": 42 // the search frequency
}
And configure:
searchableAttribute
to target the value
attributecustomRanking
to use desc(count)
as the attribute reflecting the popularityThat being said, you should know that such popular searches autocomplete can be super complex to setup to reach the UX of Amazon/Google:
tldr; If you have choice, precompute a list of searches from your products/objects instead of using your query logs :) It will be safer & easier to maintain (I'm pretty sure that's what Amazon do).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With