Unpredicted metadata_query_restricted
Good day.
My folder structure is like:
- Folder A
<5k files> - Folder B
<1 file>
<Folder B.2>
<1 file> - Folder C
<a complex structure with 2k files>
Each file in these three folders are linked to the same metadata template.
So, i'm trying to search by these files using metadata search api:
const from = 'enterprise_XXXXX.XXXXX';
const options = {
fields: [
"id",
"name",
"metadata.enterprise.XXXXXX.documentTitle"
],
limit: 10,
order_by: [
{
field_key: 'XXXXXX',
direction: 'asc'
}
],
};
const response = await client.metadata.query(from, XXXXXXX, options);
When i do that for Root Folder (0) or Folder A it works perfectly, but when i do the same request for Folder B or Folder C it cause:
metadata_query_restricted - Metadata Query API found either too many items outside the ancestor folder or too many inaccessible items matching the query.
Any ideas why?
PS: In the same way usage of a client.search.query with mdfilters works perfectly for each folder from above.
What i'm doing from business side:
We needs to have ability to order the search result not only by relevant but also by some attributes from template, and it's why i were forced to migrate from search.query to the metadata.search. Also, i lost the content search functionality and it's a but sad.
Please sign in to leave a comment.
Comments
3 comments