You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/20 07:52:00 UTC

[jira] [Created] (OFBIZ-13700) A database error while indexing adds an incomplete product or content document to the Lucene index

Mridul Pathak created OFBIZ-13700:
-------------------------------------

             Summary: A database error while indexing adds an incomplete product or content document to the Lucene index
                 Key: OFBIZ-13700
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13700
             Project: OFBiz
          Issue Type: Bug
          Components: lucene
    Affects Versions: 24.09.07, Upcoming Branch
            Reporter: Mridul Pathak
            Assignee: Mridul Pathak


h3. Problem
Since OFBIZ-13698, {{DocumentIndexer}} leaves the index unchanged when {{prepareDocument()}} throws. Two places still catch and only log database errors, so the document is indexed with fields missing:
* {{ContentDocument}} calls {{ContentWorker.getContentAncestryAll()}}, which catches {{GenericEntityException}}: the content is indexed without its {{site}} field.
* {{ProductDocument}} catches {{IOException | GeneralException}} around {{DataResourceWorker.renderDataResourceAsText()}}: the product is indexed without that content text.

{code:java}
} catch (IOException | GeneralException e1) {
    Debug.logError(e1, "Error getting content text to index", MODULE);
}
{code}

h3. Fix
{{ContentDocument}} needs an ancestry lookup that throws on database errors, and {{ProductDocument}} needs to rethrow {{GenericEntityException}}, while still logging other rendering errors so that a broken content does not block the re-indexing of the product. Applies to trunk and release24.09.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)