-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Description
Node Version
24.12.0
Package Manager
npm
Package Manager Version
11.6.2
Strapi Version
5.40.0
Operating System
Docker/Podman/LXC
Database
PostgreSQL
Javascript or Typescript
Javascript
Reproduction URL
https://github.com/gottfried-github/strapi-contains-issue
Bug Description
$contains and $containsi operators in REST API return empty data. With Document Service API, $contains works as expected (see reproduction repo).
I have both Draft & Publish and Internationalzation disabled.
I also tried to run REST API queries with SQLite and got the same result.
I also tried to run the following query using $eq operator, which does work:
curl -g localhost:1337/api/performances?filters[title][$eq]=test02
Steps to Reproduce
- import data from the backup in the reproduction repo (it contains 2 documents with the following
title:test01,test02) - run the queries
curl -g localhost:1337/api/performances?filters[title][$contains]=est02,curl -g localhost:1337/api/performances?filters[title][$containsi]=est02 - observe that empty
dataarray is returned
Expected Behavior
Should return a single document with title of test02
Logs
Code Snippets
No response
Media
No response
Additional information
No response
Confirmation Checklist
- I have checked the existing issues for duplicates.
- I agree to follow this project's Code of Conduct.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels