so I have two versions of my code starting from this list of nodes.
Version 1:
index = VectorStoreIndex(nodes, storage_context=OpenSearchVectorStore(client=client), service_context=ServiceContext.from_defaults(llm=Ollama(model="mistral"))) # client is of type OpenSearchVectorClient with my config inside
query_engine = index.as_query_engine(similarity_top_k=5)
query_engine.query("Random question")
Version 2:
index = VectorStoreIndex(nodes, service_context=ServiceContext.from_defaults(llm=Ollama(model="mistral")))
query_engine = index.as_query_engine(similarity_top_k=5)
query_engine.query("Random question")
Version 1: Works fine, gives a response in 15 seconds. (including node retrieval from opensearch that I mentioned) but adds 5 new documents to my OpenSearch database.
Version 2: times out