Description
When using the POST /entities/search endpoint to filter assets by a custom field (e.g., Site), users may receive empty results. This typically occurs when the wrong field path is referenced in the request body.
Solution
To filter assets by a custom field value (e.g., Site = US):
- Use the POST /entities/search endpoint
- Reference the custom field with the correct nested path: materials.Site
Important: The correct field path is materials.Site — not Site or fields.Site
Example request body:
{
"query": {
"$and": [
{ "$match": { "field": "type", "value": "asset", "mode": "keyword" } },
{ "$match": { "field": "materials.Site", "value": "US", "mode": "keyword", "in": "tags" } }
]
},
"options": { "sort": { "modifiedAt": "desc" } }
}
Comments
0 comments
Article is closed for comments.