Uplift upstream CL: add URL-id filter to vector search#36845
Merged
Conversation
Contributor
|
Chromium major version is behind target branch (148.0.7778.167 vs 149.0.7827.23). Please rebase. |
Contributor
0565eb3 to
f23b23d
Compare
f23b23d to
3f53753
Compare
3f53753 to
5e87039
Compare
bridiver
reviewed
Jun 3, 2026
netzenbot
approved these changes
Jun 4, 2026
72cc3ea to
2b5463b
Compare
Collaborator
|
Warning You have got a presubmit warning. Please address it if possible. Items: |
bridiver
approved these changes
Jun 10, 2026
2b5463b to
a71d746
Compare
Contributor
|
[puLL-Merge] - brave/brave-core@36845 DescriptionUpstream Chromium added a new Possible Issues
Security Hotspots
ChangesChanges
sequenceDiagram
participant Caller as Caller (AI Chat / Omnibox / WebUI)
participant Service as HistoryEmbeddingsService
participant Storage as SqlDatabase / VectorDatabaseInMemory
participant Iterator as UrlDataIterator
Caller->>Service: Search(query, time_range, count, skip_answering, url_id_filter, callback)
Service->>Service: Populate SearchParams.url_id_filter
Service->>Storage: FindNearest(query_embedding, search_params)
Storage->>Storage: MakeUrlDataIterator(time_range_start, url_id_filter)
Storage->>Iterator: Create (build SQL with optional WHERE clauses / in-memory filter)
loop For each row
Iterator-->>Storage: Next() → UrlData (filtered by time + url_id)
Storage->>Storage: Score embedding similarity
end
Storage-->>Service: SearchInfo (scored results)
Service-->>Caller: callback(SearchResult)
|
Mirrors https://chromium-review.googlesource.com/c/chromium/src/+/7902082 (merged as 95bcdbb98451). Threads a vector<URLID> url_id_filter from HistoryEmbeddingsSearch::Search through SearchParams into VectorDatabase::MakeUrlDataIterator. When non-empty, SqlDatabase fetches only matching rows via 'WHERE passages.url_id IN (?,...)' in a single statement; VectorDatabaseInMemory honors it inline. Existing upstream callers (omnibox provider, WebUI handler, AI data service) pass {} to preserve current behavior. Patches drop once the local chromium baseline includes the merged CL.
a71d746 to
189dd13
Compare
Collaborator
|
Released in v1.93.55 |
bridiverbot
pushed a commit
to bridiverbot/brave-core
that referenced
this pull request
Jun 11, 2026
Mirrors https://chromium-review.googlesource.com/c/chromium/src/+/7902082 (merged as 95bcdbb98451). Threads a vector<URLID> url_id_filter from HistoryEmbeddingsSearch::Search through SearchParams into VectorDatabase::MakeUrlDataIterator. When non-empty, SqlDatabase fetches only matching rows via 'WHERE passages.url_id IN (?,...)' in a single statement; VectorDatabaseInMemory honors it inline. Existing upstream callers (omnibox provider, WebUI handler, AI data service) pass {} to preserve current behavior. Patches drop once the local chromium baseline includes the merged CL.
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.
Resolves brave/brave-browser#55935
Mirrors https://chromium-review.googlesource.com/c/chromium/src/+/7902082
(merged as 95bcdbb98451). Threads a vector url_id_filter from
HistoryEmbeddingsSearch::Search through SearchParams into
VectorDatabase::MakeUrlDataIterator. When non-empty, SqlDatabase fetches
only matching rows via 'WHERE passages.url_id IN (?,...)' in a single
statement; VectorDatabaseInMemory honors it inline.
Existing upstream callers (omnibox provider, WebUI handler, AI data
service) pass {} to preserve current behavior.
Patches drop once the
local chromium baseline includes the merged CL.