[DEFECT] `api/v1/content/search` not working with block editor fields
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
It seems the api/v1/content/search endpoint breaks when calling upon Block Editor fields via searchableFieldsByContentType.
Quick example:
curl -X POST "https://demo.dotcms.com/api/v1/content/search" \
-H "Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==" \
-H "Content-Type: application/json" \
-d '{
"searchableFieldsByContentType": {
"Blog": {
"title": "snow"
}
},
"orderBy": "modDate desc",
"page": 1,
"perPage": 20
}'
There are two demo blog posts with "snow" in their title. This call grabs both of them. So far so good. Now, let's add a tag:
curl -X POST "https://demo.dotcms.com/api/v1/content/search" \
-H "Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==" \
-H "Content-Type: application/json" \
-d '{
"searchableFieldsByContentType": {
"Blog": {
"title": "snow",
"tags": "iceboating"
}
},
"orderBy": "modDate desc",
"page": 1,
"perPage": 20
}'
Since only one of the two blogs has the iceboating tag, it'll only grab that one — the one about different snow sports to try. Looks good. But NOW, let's try to look within the Block Editor blogContent field:
curl -X POST "https://demo.dotcms.com/api/v1/content/search" \
-H "Authorization: Basic YWRtaW5AZG90Y21zLmNvbTphZG1pbg==" \
-H "Content-Type: application/json" \
-d '{
"searchableFieldsByContentType": {
"Blog": {
"title": "snow",
"blogContent": "tricks"
}
},
"orderBy": "modDate desc",
"page": 1,
"perPage": 20
}'
This one SHOULD grab the other "snow" article (the one on snowboard tricks) only. Instead it returns a completely empty object. No Block Editor search seems to succeed.
Steps to Reproduce
- Confirm that the relevant blog posts currently exist on https://demo.dotcms.com/blog/
- Try the calls listed above
Acceptance Criteria
Block Editor fields should be searchable by this endpoint.
dotCMS Version
dotcms-core 25.12.16-01 (December 16, 2025 9:57 PM)
Severity
Medium - Some functionality impacted
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three POST requests against the api/v1/content/search endpoint and compare the title and tag results with the blogContent result. Trace how searchableFieldsByContentType handles Block Editor fields; done means the final request returns the matching snowboard-tricks article while existing title and tag behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100