Skip to content

Sitemap: Read from semantic index for content_last_updated#3104

Merged
reakaleek merged 1 commit intomainfrom
calm-apatosaurus
Apr 14, 2026
Merged

Sitemap: Read from semantic index for content_last_updated#3104
reakaleek merged 1 commit intomainfrom
calm-apatosaurus

Conversation

@reakaleek
Copy link
Copy Markdown
Member

What

Switch sitemap generation to query the semantic index instead of the lexical index.

Why

The content_last_updated field is only populated in the semantic index (docs-assembler.semantic-{env}-latest). The sitemap command was querying the lexical index, which doesn't have this field, causing it to fail.

How

Changed DocumentationMappingContext.DocumentationDocument to DocumentationMappingContext.DocumentationDocumentSemantic in AssemblerSitemapService.

Test plan

  • Run assembler sitemap against an environment with the semantic index populated
  • Verify the generated sitemap.xml contains correct <lastmod> dates

Notes

The Changes API already reads from the semantic index via ElasticsearchClientAccessor — no change needed there.

🤖 Generated with Claude Code

The sitemap command was querying the lexical index, which does not
have content_last_updated populated. Switch to the semantic index
where the field is available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@reakaleek reakaleek requested a review from a team as a code owner April 14, 2026 11:14
@reakaleek reakaleek requested a review from cotti April 14, 2026 11:15
@reakaleek reakaleek added the fix label Apr 14, 2026
@reakaleek reakaleek requested a review from Mpdreamz April 14, 2026 11:16
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e4c6b772-b4f5-43ee-8226-01f9d8092807

📥 Commits

Reviewing files that changed from the base of the PR and between aa23769 and 6763390.

📒 Files selected for processing (2)
  • src/services/Elastic.Documentation.Assembler/Building/AssemblerSitemapService.cs
  • src/services/Elastic.Documentation.Assembler/Building/EsSitemapReader.cs

📝 Walkthrough

Walkthrough

The sitemap generation service was updated to query the semantic Elasticsearch index instead of the lexical index. Two files were modified: AssemblerSitemapService.cs now uses DocumentationMappingContext.DocumentationDocumentSemantic when resolving the target index, and the corresponding documentation in EsSitemapReader.cs was updated to reflect that it reads from the semantic index. No functional signatures changed; only the index targeting was adjusted.

Suggested labels

fix

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: switching sitemap generation to read from the semantic index instead of the lexical index.
Description check ✅ Passed The description provides clear context for the change, explaining what was changed, why it was necessary, and how it was implemented.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch calm-apatosaurus

Comment @coderabbitai help to get the list of available commands and usage tips.

@reakaleek reakaleek merged commit 7832e4c into main Apr 14, 2026
28 of 29 checks passed
@reakaleek reakaleek deleted the calm-apatosaurus branch April 14, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants