Accessing vectors

How can I find the exact vector of an object? For example, if one of the properties is URL, and I want to find the vector with xyz URL, can I access the vector numbers?

Hi @Siddhi_Bansal :wave:,

To accomplish the above you can use a with_where filtering query to get objects where the url is xyz and then use the additional property to specify that you want the vector to be returned along with the object, explained here.

Hey @Siddhi_Bansal,

To retrieve a vector with your objects, you need to request it as an additional field using
.with_additional("vector") (see docs) – like this:

python

response = (
    client.query
    .get("CollectionName")
    .with_additional("vector")
    .do()
)
print(response)

Then you can also add a where filter (see docs), like this:

response = (
    client.query
    .get("CollectionName")
    .with_additional("vector")
    .with_where({
        "path": ["url"],
        "operator": "Equal",
        "valueText": "some_url_here"
    })
    .with_limit(4)
    .do()
)
print(response)