Exists Query on Vector Field

Hello! For a feature I’m working on I need to know how many documents in my index actually have a vector field indexed. I assumed a simple exists query would do the trick, but though there are documents with vectors indexed my query always shows that there are no hits. Is there some other way to calculated the value I am looking for?

query example:

GET /index/_search
{
  "query": {
    "exists": {
      "field": "nexted.vector.field"
    }
  }
}

Hi @dnock

Which version is your cluster? Awhile back we had a similar issue that got fixed in ODFE 1.11: existsQuery knn vecter is not run! · Issue #197 · opendistro-for-elasticsearch/k-NN · GitHub.

Jack

We’re on version 7.1. According that thread 7.9 is needed.

Thanks,
Dylan