Find answers from the community

Updated 3 months ago

@Logan M Getting the error-

Getting the error-OpensearchVectorClient' object has no attribute 'stores_text'

executed this code-

vector_store = OpensearchVectorClient(
host,
idx,
1536,
http_auth = os_auth,
timeout=300,
port = 443,
use_ssl=True,
verify_certs=True,
embedding_field=embedding_field,
text_field=text_field
)

index = VectorStoreIndex.from_vector_store(
vector_store
)
query_engine = index.as_query_engine(streaming = True)
res = query_engine.query("How to ride bicycle ")
res.print_response_stream()
W
L
2 comments
Cna you share full error log, that will help to debug
OpenSearchVectorStore indeed does not store text.

You need to persist the index, so that the text is saved to the docstore, and load it from there

(my imports assume you are using v0.10.x)
Plain Text
index.storage_context.persist(persist_dir="./storage")

from llama_index.core import load_index_from_storage
storage_context = StorageContext.from_defaults(persist_dir="./storage", vector_store=vector_store)

index = load_index_from_storage(storage_context)
Add a reply
Sign up and join the conversation on Discord