Skip to content

RUN-5040: Fix docsearch config: use indices instead of indexName - #1987

Merged
ltamaster merged 2 commits into
4.0.xfrom
RUN-5040-fix-docsearch-indices
Oct 2, 2026
Merged

ltamaster merged 2 commits into
4.0.xfrom
RUN-5040-fix-docsearch-indices

Conversation

@ltamaster

Copy link
Copy Markdown
Contributor

Summary

  • The Search button on docs.rundeck.com throws TypeError: Cannot read properties of undefined (reading 'map').
  • Cause: @vuepress/plugin-docsearch rc.134 (bumped in 3cc0d8f) calls indices.map(...), but our config still used the legacy indexName + root-level searchParameters, so indices was undefined.
  • Fix: move to indices: [{ name: 'prod_rundeck_docs', searchParameters: {...} }] in docs/.vuepress/config.ts.

Test plan

  • npm ci && npm run docs:dev, click Search: no console errors
  • Search returns results (check the lang:<locale> facet filter the plugin adds per index doesn't filter everything out)

Jira: RUN-5040

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ltamaster
ltamaster requested review from a team and a balanced review from Copilot October 2, 2026 13:57
@ltamaster ltamaster added this to the 6.3.0 milestone Oct 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The canonical DocSearch guide still documents the broken legacy configuration.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Updates DocSearch configuration for compatibility with @vuepress/plugin-docsearch rc.134.

Changes:

  • Replaces legacy indexName with indices.
  • Moves search parameters into the index configuration.
File Description
docs/​.vuepress/​config.ts Migrates DocSearch to the required multi-index configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/.vuepress/config.ts
Comment on lines +134 to +138
searchParameters: {
hitsPerPage: 100,
facetFilters: [`version:${setup.base}`],
facets: ['tags']
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, updated .claude/docs/docsearch-filters.md to show the indices wrapper (with a note about the rc.134 requirement), and also fixed the searchParameters references in .claude/docs/writing-style.md. Pushed in a5a1af1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ltamaster ltamaster changed the title [RUN-5040] Fix docsearch config: use indices instead of indexName RUN-5040: Fix docsearch config: use indices instead of indexName Oct 2, 2026
@ltamaster
ltamaster requested a balanced review from Copilot October 2, 2026 14:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The configuration matches rc.134’s API while preserving existing search filters.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

@ltamaster
ltamaster merged commit 936b0b7 into 4.0.x Oct 2, 2026
5 checks passed
@ltamaster
ltamaster deleted the RUN-5040-fix-docsearch-indices branch October 2, 2026 14:35
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

Successfully merging this pull request may close these issues.

3 participants