vector_store = QdrantVectorStore(client=client, collection_name="data") storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents( documents=documents, storage_context=storage_context )
retriever = index.as_retriever(similarity_top_k=2) retriever.retrieve("query")