💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Clear deleted scores at the end of common-term merging
LimbC-C9f9b32e0701a
diff --git a/src/python/txtai/scoring/terms.py b/src/python/txtai/scoring/terms.pyindex 196b8f0b..65d77a39 100644--- a/src/python/txtai/scoring/terms.py+++ b/src/python/txtai/scoring/terms.py@@ -523,9 +523,6 @@ class Terms:if not hasscores:matches = self.candidates(scores, topn)- # Common term scores can restore deleted candidates; clear them before ranking.- scores[self.deletes] = 0-# Reorder matches using updated scoresmatches = matches[np.argsort(-scores[matches])]@@ -561,6 +558,9 @@ class Terms:# Update scoresscores[uids] += freq * weights+ # Common term scores can restore deleted candidates; clear them after merging.+ scores[self.deletes] = 0+def candidates(self, scores, topn):"""Gets the topn scored candidates. This method ignores deleted documents.