Skip to content

Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search#37784

Merged
onceLearner merged 10 commits into
masterfrom
reda.elissati/fix-index-endpoint-api
Jun 29, 2026
Merged

Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search#37784
onceLearner merged 10 commits into
masterfrom
reda.elissati/fix-index-endpoint-api

Conversation

@onceLearner

@onceLearner onceLearner commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Previously, only the endpoint description was indexed, consequence: searching the endpoints yields in no result: https://docs.datadoghq.com/search/?s=%2Fapi%2Fv2%2Fip_allowlist

This change adds the HTTP method and path to the search index, allowing searches such as GET /<path> to return the corresponding endpoint.

example: https://docs-staging.datadoghq.com/reda.elissati/fix-index-endpoint-api/search/?s=POST%20api%2Fv2%2Fbits-ai%2Finvestigations

Merge readiness

  • Ready for merge

For Datadog employees:

  • ⚠️ Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR.
  • 🤖 New: Comment with /review to run an automated check that catches common issues before a Documentation team member reviews your PR.

AI assistance

Additional notes

Append the HTTP method and REST path to each API endpoint's search
content so users can find endpoints by typing the path. Capture the
method and path in api-pages-full-index.json and pass them to the
per-endpoint indexer.
@github-actions github-actions Bot added the Architecture Everything related to the Doc backend label Jun 26, 2026
Remove the endpoint path/method indexing changes so this branch builds
the master baseline search.json for diffing. To be re-added later.
Compare anchorized summaries in the v1/v2 disambiguation so endpoints
whose translated summaries differ only by punctuation (e.g. trailing
period) still get a unique -v1/-v2 anchor instead of colliding on one
objectID and churning on every sync.
@onceLearner onceLearner changed the title Reda.elissati/fix index endpoint api Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search Jun 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

Forward $endpoint_path/$method into api-page-index.json and add a
commented-out append to the content field. Disabled by default (uncomment
one line to enable); output is unchanged from baseline.
Append "METHOD /path" to each API endpoint record's content so endpoint
REST paths are searchable. Appended at the end to keep it out of the start
of the auto-embedded content.
@onceLearner onceLearner marked this pull request as ready for review June 26, 2026 17:49
@onceLearner onceLearner requested a review from a team as a code owner June 26, 2026 17:50
@onceLearner onceLearner merged commit 3b73de9 into master Jun 29, 2026
19 checks passed
@onceLearner onceLearner deleted the reda.elissati/fix-index-endpoint-api branch June 29, 2026 14:54
cswatt pushed a commit that referenced this pull request Jun 29, 2026
…37784)

* feat(search): index API endpoint REST paths in content field

Append the HTTP method and REST path to each API endpoint's search
content so users can find endpoints by typing the path. Capture the
method and path in api-pages-full-index.json and pass them to the
per-endpoint indexer.

* docs(search): comment API endpoint path/method capture

* chore(search): revert API path indexing to baseline

Remove the endpoint path/method indexing changes so this branch builds
the master baseline search.json for diffing. To be re-added later.

* fix(search): dedupe v1/v2 API records by anchorized summary

Compare anchorized summaries in the v1/v2 disambiguation so endpoints
whose translated summaries differ only by punctuation (e.g. trailing
period) still get a unique -v1/-v2 anchor instead of colliding on one
objectID and churning on every sync.

* [empty] trigger build to test updated api

* [test] tweak bits_chat overview wording to verify single-record sync diff

* Revert [test] bits_chat wording change

* Re-add API path/method indexing as a commented, inert toggle

Forward $endpoint_path/$method into api-page-index.json and add a
commented-out append to the content field. Disabled by default (uncomment
one line to enable); output is unchanged from baseline.

* Enable API endpoint path/method indexing in content field

Append "METHOD /path" to each API endpoint record's content so endpoint
REST paths are searchable. Appended at the end to keep it out of the start
of the auto-embedded content.

* Trim stale/low-value comments on API path indexing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants