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

Support for versioning #35

Open
fasolens opened this issue Dec 18, 2020 · 2 comments
Open

Support for versioning #35

fasolens opened this issue Dec 18, 2020 · 2 comments

Comments

@fasolens
Copy link

fasolens commented Dec 18, 2020

Hi,
I am using versioning in my docs. When I search some string f.ex. firewall, it displays results for all versions.

image

I have tried to exclude router for versions other then the newest with:

[
      require.resolve('docusaurus-lunr-search'),
      {
        excludeRoutes: [
          'docs/2.4.2/**/*',
          'docs/2.4.1/**/*',
        ]
      }
],

It would be nice to point only to the newest existing document. (It can happen that in new version, some documents are removed), or display version in search results.

@unitALG
Copy link

unitALG commented May 26, 2022

I have a similar issue with excludeRoutes, in that it doesn't seem to exclude the paths that I pass in:

    [require.resolve('docusaurus-lunr-search'), {
      excludeRoutes: [ // exclude LXDS materials from search
        'docs/lxds-advanced/**/*',
        'docs/lxds-get-started/**/*',
        'docs/lxds-post-pub/**/*',
        'docs/lxds-publish/**/*',
        'docs/lxds-quickstart/**/*',
        'docs/lxds-standards/**/*', 
      ]
    }]

It still indexes all of those paths. Is there something I'm doing wrong or is this feature broken?

@hrumhurum
Copy link

hrumhurum commented Aug 10, 2023

Displaying versions in search results is one possibility, but the most natural choice would be to just search in the scope of a currently selected version. By following this approach, search results won't contain intermixed versions at all thus avoiding any confusion.

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

3 participants