dotCMS / dotCMS/core

[DEFECT] `api/v1/content/search` not working with block editor fields

Open
#34,151 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dotCMS : Content Management dotCMS : Rest API OKR : Customer Support Priority : 4 Low
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
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.