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/19 17:03:00 UTC
[jira] [Closed] (OFBIZ-13698) A database error while indexing deletes the product or content from the Lucene index
[ https://issues.apache.org/jira/browse/OFBIZ-13698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13698.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.08
Resolution: Fixed
> A database error while indexing deletes the product or content from the Lucene index
> ------------------------------------------------------------------------------------
>
> Key: OFBIZ-13698
> URL: https://issues.apache.org/jira/browse/OFBIZ-13698
> Project: OFBiz
> Issue Type: Bug
> Components: lucene
> Affects Versions: Upcoming Branch, 24.09.07
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Major
> Fix For: Upcoming Branch, 24.09.08
>
>
> h3. Problem
> {{ProductDocument.prepareDocument()}} and {{ContentDocument.prepareDocument()}} log and swallow entity and rendering exceptions and return {{null}}, and {{DocumentIndexer.run()}} treats a {{null}} document as a removed record and calls {{indexWriter.deleteDocuments()}}. Any transient database error while indexing therefore silently removes the product or content from the Lucene index.
> {code:java}
> } catch (GenericEntityException e) {
> Debug.logError(e, MODULE);
> }
> return null; // DocumentIndexer then deletes the document from the index
> {code}
> h3. Fix
> {{LuceneDocument.prepareDocument()}} needs to throw when the document cannot be prepared, keeping {{null}} for "remove from the index", and {{DocumentIndexer}} needs to log and skip such a document, leaving the index unchanged. Applies to trunk and release24.09.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)