New Website Structure Breaks Search Result

We are Algolia Docsearch users and we recently changed our website structure with the new version. We improved our website by adding support to different versions of our docs thus leading to a new directory structure. (newest docs are in then etc…

We would love to know, if there is some way to make Algolia aware of those different versions?

:wave: @obasiuche62

Thanks to this update of your configuration, you can now filter on the docsearch meta tags you have added. You will need to update the JS snippet integrated within your website as follow:

  apiKey: '649aaeb84811844d97cb5aa0398b94d9',
  indexName: 'thanos',
  inputSelector: '### REPLACE ME ####',
  algoliaOptions: { 'facetFilters': ["version:$VERSION", "language:$LANGUAGE"] },
  debug: false // Set debug to true if you want to inspect the dropdown

The list of possible version and languages are extracted from the DocSearch meta tags. So as of today you have:

  • For version: tip, v0.1, v0.10, v0.11, v0.12, v0.13, v0.14, v0.15, v0.2, v0.3, v0.4, v0.5, v0.6, v0.7, v0.8, v0.9
  • For language: en

For example if you want to refine the search to the version “tip” and the language “en” just specify:

'facetFilters': ["version:tip", "language:en"]

If you need more details, please refer to the dedicated section of our documentation.


1 Like

Thanks alot @Sylvain.PACE
This was very helpful

Hi @Sylvain.PACE,
we noticed search still renders results from different versions of docs when used on our landing page-

Is there a way for us to make search results on the landing page show only tip instead?

Hi @obasiuche62,

I have answered to you via email and updated your config, feel free to let us know if there’s still an issue with your search experience.

Have a nice day.

1 Like

Acknowledged. Thanks @clement.vannicatte!