Repository navigation
Widgets (#317) PR 7: widgets in Combined Search - #663
Merged
Merged
Conversation
Combined Search now fills `widgets` like /api/v2/search/: widget stubs the query triggers, looked up alongside the index retrieval and Staan, and the calculator for arithmetic, which is then searched as "calculator". No functional changes to the crawler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTbu4n4rmxkjADVxDX41kb
…317) Review found the arithmetic path ran the whole pipeline for "calculator": an EUSP call, an index write, images and a seed crawl for a query nobody typed. Like v2 search, it now returns the calculator results, ranked once an hour, and skips all of that. No functional changes to the crawler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DTbu4n4rmxkjADVxDX41kb
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Combined Search (
/api/v2/combined-search/) now fillswidgetsthe same way/api/v2/search/does.WidgetFinder.findruns in a thread next to the index retrieval and the Staan fetch, so it adds no latency.init_routernow takes thetiny_indexand loads the specs at startup, as v2 does.164*8returns acalculationwidget and the results for "calculator". Those results come from a sharedCalculatorResultsover the combined ranker, ranked once an hour.crawlandimagesare ignored. None of that work would be for the query the user typed.Why
Combined Search is meant to replace Super Search and shares v2's response shape, so clients should get the same widgets from either endpoint.
Review
A subagent reviewed the change: code, security, trust and safety, and holistic.
findin a thread is safe: index reads use offsets, and the finder is immutable.Verification
make check: ruff passes, and ty shows nothing new in the changed files.make test: 2138 passed, 10 skipped, before the follow-up commit. After it, the combined search, OpenAPI and widget tests pass (232).test/test_combined_search.py:crawl=true&images=truereturns the calculation and the calculator results, is billed, and calls nothing but the ranker'ssearch.Part of #317. Stacked on #658.
Generated by Claude Code