-
Couldn't load subscription status.
- Fork 21
Description
What is the bug?
When we use aggregation in /_plugins/_ml/models/_search API, it returns error like
{
"error": {
"root_cause": [
{
"type": "status_exception",
"reason": "Fail to search model version"
}
],
"type": "status_exception",
"reason": "Fail to search model version"
},
"status": 500
}
How can one reproduce the bug?
In Opensearch 2.19 or 3.0.0 alpha1, we create any connector and corresponding remote ml model. Then we call
POST /_plugins/_ml/models/_search
{
"size": 0,
"aggs": {
"unique2_connector_names": {
"terms": {
"field": "connector.name.keyword",
"size": 10000
}
}
}
}
Then we will get error.
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
I think it's related to current repo because In ml commons, In line 142 in MLSearchHandler we use sdkClient.searchDataObjectAsync from library remote-metadata-sdk. After changing it to cient.search , it works. Also, I fetch the search request body in the debug mod and call _search directly, it also works. So I think the problem is from the remote-metadata-sdk library.