diag(matcher): debug-log provider search query + per-provider result counts
Adds DEBUG logs in the ModeInitialMatch search path: each provider's result
count for the query, and the assembled raw/candidate totals. Lets us see when a
provider search returns zero ('no metadata found') vs a scoring/tie issue.
Zero behavior change.
This commit is contained in:
@@ -886,6 +886,12 @@ func (s *MetadataService) processInternal(ctx context.Context, req ProcessReques
|
||||
"provider", p.Slug(), "error", err)
|
||||
continue
|
||||
}
|
||||
slog.Debug("metadata: provider search result",
|
||||
"provider", p.Slug(),
|
||||
"query_title", searchQuery.Title,
|
||||
"query_year", searchQuery.Year,
|
||||
"result_count", len(results),
|
||||
)
|
||||
for _, result := range results {
|
||||
if searchResultConflictsWithTrustedIDs(accumulatedIDs, result.ProviderIDs) {
|
||||
slog.Warn("metadata: skipping conflicting search result",
|
||||
@@ -902,6 +908,12 @@ func (s *MetadataService) processInternal(ctx context.Context, req ProcessReques
|
||||
}
|
||||
|
||||
candidates := NormalizeCandidates(allResults, contentType)
|
||||
slog.Debug("metadata: search candidates assembled",
|
||||
"query_title", searchQuery.Title,
|
||||
"query_year", searchQuery.Year,
|
||||
"raw_results", len(allResults),
|
||||
"candidates", len(candidates),
|
||||
)
|
||||
providerPriority := make([]string, 0, len(itemChain))
|
||||
for _, p := range itemChain {
|
||||
providerPriority = append(providerPriority, p.Slug())
|
||||
|
||||
Reference in New Issue
Block a user