diff --git a/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ContentletIndexAPIImpl.java b/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ContentletIndexAPIImpl.java index cb675e4d76f..e4a562ac09d 100644 --- a/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ContentletIndexAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/content/elasticsearch/business/ContentletIndexAPIImpl.java @@ -3264,8 +3264,11 @@ private void mirrorDeactivateToOsStore(final String indexName) throws DotDataExc */ @Override public long getIndexDocumentCount(final String indexName) { - return router.readProvider().getIndexDocumentCount( - indexAPI.getNameWithClusterIDPrefix(indexName)); + // Resolve the physical name through the read provider's own toPhysicalName so the OS read + // path (phases 2/3) receives the .os-tagged name. getNameWithClusterIDPrefix adds only the + // cluster prefix (no .os tag), so under OS reads the index was reported as not found. + final ContentletIndexOperations readProvider = router.readProvider(); + return readProvider.getIndexDocumentCount(readProvider.toPhysicalName(indexName)); } /**