💡 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
Require must and must not tokens to have at least 1 character trailing a +/-
davidmezzettib0763492ab7f
diff --git a/src/python/txtai/extractor.py b/src/python/txtai/extractor.pyindex 75b7f18c..e9ad9283 100644--- a/src/python/txtai/extractor.py+++ b/src/python/txtai/extractor.py@@ -85,8 +85,8 @@ class Extractor(object):results = []for query in queries:# Get list of required and prohibited tokens- must = [token.strip("+") for token in query.split() if token.startswith("+")]- mnot = [token.strip("-") for token in query.split() if token.startswith("-")]+ must = [token.strip("+") for token in query.split() if token.startswith("+") and len(token) > 1]+ mnot = [token.strip("-") for token in query.split() if token.startswith("-") and len(token) > 1]# Tokenize search queryquery = self.tokenizer.tokenize(query)