A collection with lexical, rerank and vectorize support still may return a "naked" Unexpected server error / IllegalArgumentException when a findAndRerank command does not provide a $vectorize (rather only $lexical) in its sort clause and rerankQuery is provided.
Expectation: an error message that does not expose an internal exception, rather wraps it and rejects it gracefully at command-validation stage. (see current error below)
Verified on 2026-09-03 on a prod Astra Data API on kube 189267260851 (AWS us-east-2)
Reproduction
Note: below, "bad query" means not that this does not succeed (which is the correct thing): it means that the returned error looks like a unhandled internal "IllegalArgumentException" rather than a clean validation error. When omitting $vectorize from the sort, but also skipping rerankQuery, the error is a good, clear validation error as it should be (==> MISSING_RERANK_QUERY_TEXT).
Create collection:
{
"createCollection": {
"name": "c",
"options": {
"vector": {
"service": {
"provider": "nvidia",
"modelName": "nvidia/nv-embedqa-e5-v5"
}
}
}
}
}
Bad query 1:
{
"findAndRerank": {
"filter": {
"$lexical": {
"$match": "bla"
}
},
"sort": {
"$hybrid": {
"$lexical": "ble"
}
},
"options": {
"rerankOn": "$lexical",
"rerankQuery": "blo"
}
}
}
Bad query 2:
{
"findAndRerank": {
"filter": {
"$lexical": {
"$match": "bla"
}
},
"sort": {
"$hybrid": {
"$lexical": "ble"
}
},
"options": {
"rerankQuery": "blo"
}
}
}
Naked error the caller receives:
Unexpected server error: An unexpected server error occurred while processing the request.
Error Class: IllegalArgumentException
Error Message: buildVectorRead() - no vector or vectorize
Review the Error Message before retrying this request. (UNEXPECTED_SERVER_ERROR)
A collection with lexical, rerank and vectorize support still may return a "naked"
Unexpected server error / IllegalArgumentExceptionwhen a findAndRerank command does not provide a $vectorize (rather only $lexical) in its sort clause and rerankQuery is provided.Expectation: an error message that does not expose an internal exception, rather wraps it and rejects it gracefully at command-validation stage. (see current error below)
Verified on 2026-09-03 on a prod Astra Data API on kube 189267260851 (AWS us-east-2)
Reproduction
Note: below, "bad query" means not that this does not succeed (which is the correct thing): it means that the returned error looks like a unhandled internal "IllegalArgumentException" rather than a clean validation error. When omitting
$vectorizefrom the sort, but also skippingrerankQuery, the error is a good, clear validation error as it should be (==>MISSING_RERANK_QUERY_TEXT).Create collection:
Bad query 1:
Bad query 2:
Naked error the caller receives: