QueryMetadata resolves the filter against the encrypted metadata index and returns the matching IDs. With Text, it also ranks matches by BM25 relevance. It works on untrained indexes.
Parameters
QueryMetadataParams
- Without
OrderByorText, results come back in no particular order. - Items missing the
OrderByfield, or holding a non-scalar value in it, sort last.
Filter constraints
Query falls back to a post-filter over decrypted metadata when the index can’t answer a filter, for pure vector queries. QueryMetadata has no fallback, so every filter must be answerable from the index. The index’s MetadataSchema is therefore enforced here:
$regexand$containsneed a field created withPatterntrue.- A field created with
Filterablefalsecan’t be filtered on. $typeisn’t supported.
*ValidationError (HTTP 400) with the reason. Nested dot-paths such as "loc.city" are supported.
Returns
*QueryMetadataResponse:
Errors
*ValidationError
*ValidationError
The service rejects the query (HTTP
400): see Filter constraints.*AuthenticationError
*AuthenticationError
The
apiKey is invalid (HTTP 401).*ServiceError / *TransportError
*ServiceError / *TransportError
The service returns
5xx or can’t be reached.