0

I'm facing an issue in Contentful when performing partial searches involving slashes ("/") across various APIs, including GraphQL, the Content Delivery API (CDN API), and the Contentful GUI. The problem arises when attempting to search for substrings within slugs that contain slashes.

For example, let's take a slug like "/foo/bar":

  • In GraphQL, a search for slug_contains: "/foo" correctly returns entries with the slug "/foo/bar".
  • However, when attempting to search for slug_contains: "/bar" or slug_contains: "bar", the query fails to return any results, despite entries having "/foo/bar" in the slug.

I had anticipated that the search would match any slugs containing the substring "/bar" or "bar" anywhere within the slug, regardless of the preceding slashes.

Could someone kindly clarify whether this behavior is expected across all Contentful APIs and the GUI? Alternatively, if there is a different approach to achieve partial matching with slashes in the slug, I would greatly appreciate any insights you may have!

Thank you all for your help!

0 Answers0