added Hybrid Search with BM25
Browse files
app.py
CHANGED
@@ -272,7 +272,11 @@ class BSIChatbot:
|
|
272 |
#print(vectorstore.index_to_docstore_id)
|
273 |
print(vectorstore)
|
274 |
# Iteriere über alle IDs im index_to_docstore_id
|
275 |
-
|
|
|
|
|
|
|
|
|
276 |
# Hole das Dokument aus dem docstore
|
277 |
#print("DBG:"+doc_id)
|
278 |
document = vectorstore.get_by_ids(doc_id)
|
|
|
272 |
#print(vectorstore.index_to_docstore_id)
|
273 |
print(vectorstore)
|
274 |
# Iteriere über alle IDs im index_to_docstore_id
|
275 |
+
|
276 |
+
docs = vectorstore.max_marginal_relevance_search("",9999,9999,0)
|
277 |
+
|
278 |
+
#for doc_id in vectorstore.index_to_docstore_id.values():
|
279 |
+
for doc_id in docs:
|
280 |
# Hole das Dokument aus dem docstore
|
281 |
#print("DBG:"+doc_id)
|
282 |
document = vectorstore.get_by_ids(doc_id)
|