22 May 2018

Is it possible to apply weights/boosts to a specific attribute?

Even better! Giving more or less importance to an attribute of your records is a built-in feature of Algolia.

The setting searchableAttributes is not only used to specify the attributes you want to search on. It’s also used to specify the relative importance of each attribute.

For instance, if you want to give more importance to the keywords in the name than the description, then you would place the attribute “name” before the attribute “description” in your searchableAttributes list.

Apply weights simple

If you want multiple attributes to have the same importance, you can just group them by making a comma-separated list.

Apply weights comma