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

[Feature]: Separate search index by version #947

Closed
jbroma opened this issue Apr 12, 2024 · 3 comments
Closed

[Feature]: Separate search index by version #947

jbroma opened this issue Apr 12, 2024 · 3 comments

Comments

@jbroma
Copy link
Contributor

jbroma commented Apr 12, 2024

What problem does this feature solve?

When searching through documentation, I would like to only display results relevant to the currently selected version.
Right now, all versions get combined into one search index.

Splitting the search index into separate entities by version would also reduce size needed to download upon opening the search panel.

What does the proposed API look like?

To make it non-breaking, it could be introduced as an optional prop to config.search like this:

//rspress.config.ts
export default defineConfig({
  search: {
    versioned: true,
  },
});
@jbroma
Copy link
Contributor Author

jbroma commented Apr 15, 2024

@sanyuan0704 I see the PR got merged, but the docs were not updated to reflect this change, I think it's important to mention that somewhere.

@sanyuan0704
Copy link
Contributor

@sanyuan0704 I see the PR got merged, but the docs were not updated to reflect this change, I think it's important to mention that somewhere.

@jbroma Would you like to add some docs to reflect this change?

@jbroma
Copy link
Contributor Author

jbroma commented Apr 15, 2024

sure thing, I'll add the english part 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants