Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version filtering based on folders #2061

Open
dandimeo opened this issue Sep 14, 2023 · 0 comments
Open

Version filtering based on folders #2061

dandimeo opened this issue Sep 14, 2023 · 0 comments

Comments

@dandimeo
Copy link

Description

The documentation site https://docs.arangodb.com has a folder per version version handling. (all versions are on main branch)
We currently have 3 versions: 3.10, 3.11, 3.12.

We set up Algolia DocSearch V3 and added the following facets:

searchParameters: {
      facetFilters: [`version:${version}`],
}

Version value comes from
var version = localStorage.getItem("docs-version");

However, when the version is switched through version selector and start a new search, the search results still address the previously selected version.

Steps to reproduce

  1. Go to https://docs.arangodb.com (will automatically redirect to 3.11 version, which is the stable version)
  2. Search something, the behaviour is correct showing 3.11 results
  3. Change version via the version selector (e.g. change to 3.12 version)
  4. Search something again, it will still show 3.11 results

Expected behavior

Expected behavior is to dynamically change DocSearch facetFilter value for version attribute when site's version is changed.

Environment

  • DocSearch version: 3.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant