How do I get the vectors returned with the hybrid search results?

Hi,

if you mean the vectors of the objects, you can do

            client.connect()
            try:
                collection = client.collections.get("mycollection")
                docs = collection.query.hybrid(
                    query=query,
                    alpha=0.75,
                    return_metadata=wvc.query.MetadataQuery(score=True),
                    limit=k,
                    include_vector=True,
                    query_properties=['CONTENT'],
                ).objects
docs]
            finally:
                client.close()
1 Like