Skip to content

[DEFECT] Content Drive Title scope returns no contentlets for a punctuation-only term #37710

Description

@ihoffmann-dot

Problem Statement

In Content Drive's Title search scope, a term that reduces to no usable token after splitting (for example /, *** or ,,,) returns no contentlets at all. This contradicts the approved spec for #37479:

  • FR-028: "A term that reduces to no usable token MUST produce no text clause at all, rather than a clause with an empty value."
  • Edge case — "Term that is only separators": "It yields no text clause at all rather than an empty one, and the drive lists as it would with no term."

The implementation does the opposite on purpose. BrowserAPIImpl.buildTitleScopedQuery emits MATCH_NOTHING_CLAUSE (+title:* -title:*) when every token is query syntax, and its Javadoc cites "a lone /" as the example. All Fields handles the same terms without error: / finds titles that contain it, through title_dotraw.

No error or toast appears in any case, so this is a consistency and contract issue, not a failure. Impact is low: a punctuation-only term in Title scope is rare.

This needs a decision between:

  1. Fix the code: produce no text clause, so the drive lists as with no term. That matches the spec.
  2. Amend the spec: keep "match nothing" for Title scope and update FR-028 and the edge case to say so. "Nothing" is a defensible answer for a term with no words.

Steps to Reproduce

  1. Open Content Drive on site default. Either click the site node (path=/) or add the filter Content Types = a test type, to stay clear of [DEFECT] Content Drive search drops all contentlets on large sites: ES inode batch exceeds max query-string length #37695.
  2. With an empty search box, note the contentlets listed (the control case).
  3. Search each term below in both scopes:
Term Title All Fields
/ No contentlets Contentlets whose title contains /
*** No contentlets No contentlets, no error
,,, No contentlets No contentlets, no error
(empty, control) All contentlets All contentlets

Reproduced on staging-trunk, build ef1de93, during QA of #37479.

Acceptance Criteria

  • A decision is recorded on this issue: fix the code (option 1) or amend the spec (option 2).
  • If option 1: in Title scope, a term that reduces to no usable token (/, ***, ,,,, only whitespace or separators) lists exactly what the drive lists with no term, filters included.
  • If option 1: tokens that do survive keep today's behavior, e.g. qazeta/hero still finds qazeta hero asset.
  • If option 2: FR-028 and the "term that is only separators" edge case in specs/37479-content-drive-search-scope/spec.md are amended to state the match-nothing behavior for Title scope, with the date and rationale, as FR-003 and FR-029 were.
  • Either way, a test pins the chosen behavior for /, *** and ,,, in Title scope.
  • No error, toast or non-200 response for these terms in either scope.

dotCMS Version

Latest from main: staging-trunk, build ef1de93 (2026-09-22). Includes #37554.

Severity

Low - Minor issue or cosmetic

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions