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