Retrieve documents with where query syntax throws InvalidRequestError
Retrieve documents with where query syntax throws InvalidRequestError
Expected Behavior
Successfully retrieve documents
Current Behavior
Something went wrong:
InvalidRequestError: Invalid query: Properties in where conditions must be defined as a document index
Steps to Reproduce (for bugs)
Contract's Indices:
"indices": [
{
"name": "index",
"properties": [
{
"$ownerId": "asc"
},
{
"$updatedAt": "asc"
}
],
"unique": false
}
],
Query syntax:
{
limit: 1, // Only retrieve 1 document
where: [
['$ownerId', '==', params.ownerId],
['$updatedAt', '==', params.updatedAt]
]
},
Your Environment
- Version used: dash v3.22.1
~Looks similar to #315 so the suggestion in https://github.com/dashevo/platform/issues/315#issuecomment-1085614223 will probably help.~ <- Disregard this, I read too quickly :see_no_evil:
@mayoreee can you provide link to Github with the complete query - as per todays Triage, this is likely a duplicate of https://github.com/dashevo/platform/issues/315
Further detail required to verify if user error or documentation update required.
@SamKirby22 Not sure about the query you're referring to but the query syntax has been provided in the report above. Could you please help clarify? Thanks.
This is outdated.