Do you know how to make this work btw? It used to work great with the default VectorStore but fails with Qdrant:
def find_documents(by, index, *,
order=None,
as_nodes=True):
"""
Find documents in the index.
Args:
by (Callable): A function to filter the documents.
index (llama_index.VectorStoreIndex): The index to search in.
order (Callable): A function to order the retrieved documents. Defaults to None.
as_nodes (bool, optional): Whether to return the documents as nodes. Defaults to True.
Returns:
list[Node]: The retrieved documents.
"""
doc_store = index.storage_context.docstore
doc_refs = [(doc_id, doc_ref) for doc_id, doc_ref in index.ref_doc_info.items()
if by(doc_ref)]
res = doc_refs
if as_nodes:
res = [node for _, doc_ref in doc_refs
for node in doc_store.get_nodes(doc_ref.node_ids)]
if order is not None:
res = order(res)
return res
Traceback:
File "/mnt/1472CC7972CC615A/_DISK_/_Documentos_/Scripts/RAG_Develop/LlamaIndex_RAG_Qdrant/modules/summaries.py", line 63, in recent_news_summary
documents = find_documents(DateInInterval(seven_days_ago, today),
File "/mnt/1472CC7972CC615A/_DISK_/_Documentos_/Scripts/RAG_Develop/LlamaIndex_RAG_Qdrant/modules/index.py", line 281, in find_documents
doc_refs = [(doc_id, doc_ref) for doc_id, doc_ref in index.ref_doc_info.items()
File "/mnt/1472CC7972CC615A/_DISK_/_Documentos_/Scripts/RAG_Develop/LlamaIndex_RAG_Qdrant/.venv/lib/python3.10/site-packages/llama_index/core/indices/vector_store/base.py", line 385, in ref_doc_info
raise NotImplementedError(
NotImplementedError: Vector store integrations that store text in the vector store are not supported by ref_doc_info yet.