How to preselect an indice / facet on search (pre-filter)

How can I preselect the “SIZE” facet when loading search page results (and also have this preselected for both instantsearch and autocomplete)?
I would like to pre-select “hi-res” per this example: https://chuubie.com/search?q=alex

Why?: Currently, search returning each size as it’s own result, resulting in site visitors thinking they are seeing duplicates.

Actually, this is exactly what I wanted! (hide all variants and display only 1 result per Shopify product):
Thanks @Jerska!

##Displaying by product / most relevant variant
If you want to have the most relevant variant in your results instead of all variants, it’s easy.
Here are the few steps you’ll need to follow:

  • Open https://www.algolia.com/explorer/browse
  • Select your products index (usually called shopify_products, otherwise YOUR_INDEX_PREFIXproducts) NOT “shopify_products_recently_ordered_count_desc” – make sure you switch to your primary index which is just: “shopify_products”.
  • Head to the Display tab of the index
  • Change those two settings:
  • attributeForDistinct to id
  • distinct to true
  • You’ll also need to propagate those settings to all the replicas of this index (listed in the Replicas tab). This can be done using the “Synchronize settings” button in the Settings tab of our Shopify application.
2 Likes

super that you found a solution from another thread, don’t hesitate to give us any feedback :rocket:

Awesome! Your highlighted parts definitely make sense, they should be explained in further detail in our documentation and I’ve just edited them to clearly explain the separation between replica and primary.

1 Like