first fix tag search
This commit is contained in:
@@ -169,7 +169,7 @@ def search_tags(req: SearchRequest):
|
||||
continue
|
||||
|
||||
results.append({
|
||||
"chunk_id": tag_ids[idx],
|
||||
"tag_id": tag_ids[idx],
|
||||
"score": float(score),
|
||||
})
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ final class TagRoutingService
|
||||
}
|
||||
|
||||
$hits = $this->tagSearch->search($query, self::DEFAULT_TOPK);
|
||||
|
||||
if (!is_array($hits) || $hits === []) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ final readonly class TagVectorSearchClient
|
||||
continue;
|
||||
}
|
||||
|
||||
$tagId = (string)($row['chunk_id'] ?? '');
|
||||
$tagId = (string)($row['tag_id'] ?? '');
|
||||
$score = $row['score'] ?? null;
|
||||
|
||||
if ($tagId === '' || !is_numeric($score)) {
|
||||
|
||||
Reference in New Issue
Block a user