Search hints ignore the library they were asked about #55
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
/Search/HintsignoresparentId.Searching within a library returns hits from every library. Upstream scopes the
search by
ParentId OR AncestorIds; this server drops the parameter.Not fixed alongside the ranking work because the shared narrowing this server
uses rewrites a library parent into
TopParentId, which is a visibly differentset: the music library has only 73
AncestorIdsrows, so upstream answersparentId=<music>&searchTerm=lovewith 0 where aTopParentIdscopeanswers with 10. Matching upstream needs its own narrowing path rather than the
one every other route shares.
A search is scoped to the library it was asked about.
Upstream does it in two passes, and they are not the same query.
SqlSearchProvider.ApplyParentFilterpicks candidates byParentId == pid || Parents.Any(p => p.ParentItemId == pid); thenSearchManagerre-queries those ids withParentId = pid, Recursive = true, andSetTopParentIdsOrAncestorsclearsParentId, replacing it withTopParentIdsfor a library orAncestorIdsfor anything else. The answer isthe intersection.
That is why the narrowing every other route shares is wrong here: it is the
TopParentIdhalf alone. Measured — aMusicAlbumparent yields 4 tracks fromthe first pass and 0 after the second, and upstream answers 0.
lovein Movieslovein Musiclovein Showsloveunder an albumVerified live afterwards, ordering as well as counts.
No regression to the ranking: 171 request variants and a 236-variant randomized
sweep over real parents and terms — including
%,_,', CJK, Cyrillic anddeep paging — come back identical, and the differential harness reports the same
per-scenario numbers as before the change.
Found and not fixed:
/Search/Hints?includeMedia=falseis ignored here whereupstream answers nothing. Pre-existing and orthogonal; filed separately.