内容丰富的查询内容类型和引用过滤(多个)

时间:2018-07-26 15:14:52

标签: contentful

在Contentful范围内,我的内容类型为“ post”。该帖子可以具有多个类别(另一种内容类型)。现在,我正在尝试查询帖子,但按类别对其进行过滤。我的查询看起来像这样:

https://cdn.contentful.com/spaces/$space/entries?access_token=$token&include=3&fields.categories.fields.slug=features&limit=3&skip=0&content_type=post

错误返回: You are trying to search on a reference to an unsupported type. You can only search on references to single entries

因此,基本上我只能引用1个类别,但不仅在此用例中,而且在许多情况下,我还需要很多。知道如何实现吗?

1 个答案:

答案 0 :(得分:1)

您可以翻转查询,并要求链接到某个类别的条目。

/careers/position1

https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/links-to-entry

相关问题