Fix(WEB-9483): Index HTTP Method + Path (GET /<path>) for API Search#37784
Merged
Conversation
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.
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.
Contributor
Preview links (active after the
|
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.
bgdeutsch
approved these changes
Jun 29, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
For Datadog employees:
<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./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.AI assistance
Additional notes