Find answers from the community

Updated 11 months ago

```index.query("What is the document

At a glance

The post indicates that the community member is encountering an issue with the query() method of the VectorStoreIndex object, as it does not seem to have that attribute. The community members in the comments suggest that the community member needs to use the as_query_engine() method first to get a query engine, and then call query() on that. There is no explicitly marked answer in the provided information.

Plain Text
index.query("What is the document about?")

Plain Text
'VectorStoreIndex' object has no attribute 'query'

@Logan M what's wrong with query command? thanks!
L
2 comments
index.as_query_engine().query()
need a query engine first
Add a reply
Sign up and join the conversation on Discord