Repository navigation
Description
Problem Statement
The Content Drive toolbar keyword / title search returns inconsistent, sometimes incoherent results. When a user types a title or keyword, the result list occasionally does not correspond to the query — either returning nothing coherent or items unrelated to the typed text. The behavior is intermittent, which suggests the issue is in the search-assembly / pagination path rather than a single malformed query.
Impact: affects anyone using Content Drive to locate content by name — keyword search is a primary way to find content, so incorrect results undermine trust in the tool. Content Drive is currently an in-development feature (behind the "in development" banner), so the impact is presently internal/admin, but it should be fixed before GA.
Browser & OS: appears environment-independent (this is a query/result-set issue, not rendering) — to be confirmed with a screencast.
Steps to Reproduce
Intermittent — a screencast should be captured. Approximate repro:
- Open Content Drive.
- In the toolbar keyword search, type a title or keyword known to exist in the current scope.
- Observe the result list.
- Intermittently, the results do not match the query — expected items are missing, or unrelated items are returned.
Likely depends on the number of matches, the folder-vs-content mix, which pagination page you're on, and the scored-title ordering.
Acceptance Criteria
Quick draft — to be refined after investigation.
- Reproduce and characterize when the keyword/title search returns incoherent results (data shape, pagination page, folder+content mix, number of matches).
- Identify the root cause within the Content Drive search path.
- Keyword/title search returns results that consistently match the query — correct items and stable ordering — across all pages.
dotCMS Version
Latest from main (Content Drive is in-development / pre-GA).
Severity
Medium - Some functionality impacted
Links
NA
Technical context (for the investigator)
Content Drive search is a hybrid DB-first + Elasticsearch flow (ContentDriveHelper.driveSearch → BrowserAPIImpl) with cursor-based pagination and a scored title query. The keyword search builds a Lucene query roughly:
title:<kw>* OR title:'<kw>'^15 OR title_dotraw:*<kw>*^5 OR +catchall:*<kw>*^10
sorted by score descending. Suspected areas where the result set can become incoherent:
- Hybrid DB-chunk + ES-filter pagination interacting with the score sort — score-based ordering may not be stable across DB chunks / cursor pages, so items can appear out of order, be skipped, or repeat.
- Folders and content mixed in the same paginated result set under the cursor scheme.
catchall/_dotrawwildcard behavior vs. the analyzedtitlefield (a leading/trailing wildcard on a keyword sub-field behaves differently from the analyzed match).
Related recent Content Drive work (context, not a dependency): #36383 / #36384 (field-based filters), #36638 (folder-tree loading), PR #36670.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Content Drive keyword/title search returns inconsistent or incoherent results[/-][+][BUG] Content Drive: keyword/title search returns inconsistent or incoherent results[/+]ihoffmann-dot commentedon Jul 28, 2026
Phase 0 baseline — root cause revised
Reproduced with an integration test (
ContentDriveKeywordSearchTest) that seedsIMG_1004.jpegwith synchronous indexing (IndexPolicy.WAIT_FOR) and searches via the realdriveSearchpath.IMG_1004.jpeg?IMG,Img,img,1004,IMG_1004,jpeg1004.jpegFindings:
IMGfinds the file. An early case-sensitivity hypothesis is refuted.IMG/1004both work — so the screencast (IMG/1004returning nothing or unrelated items) is not reproducible against indexed data.imgsurfaced instead. Content Drive routed the keyword search through Elasticsearch, which lags the DB (ADR-0018).1004.jpegmiss.Fix (in progress): route the name/title keyword search to the database — case-insensitive, tokenized, no index lag — while keeping Elasticsearch for index-routed field filters. This makes a just-saved file findable by name immediately (read-your-writes). Validated: after the change, every term above (including
1004.jpeg) returns the file.github-actions commentedon Jul 28, 2026
PRs linked to this issue
fix(content-drive): align keyword search with Content Search index qu…
test(content-drive): register ContentDriveKeywordSearchTest in MainSu…
test(content-drive): per-term data provider, fixture cleanup and stra…
test(content-drive): decouple BrowserAPITest from GlobalSearchAttribu…
KevinDavilaDotCMS commentedon Aug 10, 2026
QA Passed
Tested in main
966e9d52026-08-10.14-24-23.mov