Apache Lucene is an open-source Java-based full-text search engine that can power applications with search capabilities. Oracle WebCenter Sites (OWCS) has an out-of-the-box integration with Lucene to search and retrieve assets. This blog discusses some of the common Lucene search issues that can occur due to improper configuration/functioning of Lucene with OWCS, along with possible fixes.
1. Complaint 1 – “I cannot search newly created assets from OWCS contributor UI, while I can search others created in the past.”
2. Complaint 2 – “I cannot search any asset from OWCS contributor UI and the system throws an error.”
3. Complaint 3 – “I cannot expand my custom Content Tree tab because the system throws an error.”
4. Error appearing on OWCS Contributor UI – An exception occurred on the server while executing UI/Data/Search/Search: EOFException: read past EOF:
5. Error appearing on OWCS Contributor UI – An exception occurred on the server while executing UI/Data/Search/Search: ServiceException: Unable to get search index: Global
6. Error appearing on OWCS server logs – Exception including resource /jsp/cs_deployed/UI/Data/Search/SearchAction.jsp[[com.fatwire.cs.ui.framework.UIException: com.fatwire.services.exception.ServiceException:com.fatwire.cs.core.search.engine.SearchEngineException: java.io.EOFException: read past EOF:
7. Error appearing on OWCS server logs – com.fatwire.cs.ui.framework.UIException: com.fatwire.services.exception.ServiceException: Unable to get search index : Global…
8. Error appearing on OWCS server logs – Exception including resource /jsp/cs_deployed/OpenMarket/Xcelerate/Search/GlobalIndexSourceConfig.jsp[[java.lang.NullPointerException
1. Always make sure the following fundamental configurations/settings are in place:
a. Lucene search indexing is always turned ON.
b. Contents of AssetType(s) you are trying to search are already Indexed Globally.
c. Asset Event Listener (com.openmarket.basic.event.SearchAssetIdEventListener) entitled to trigger Lucene indexing is enabled. This can be verified by checking the AssetListener_reg table.
2. After verifying the above-mentioned configurations, if the issue still persists, we might need to execute the following steps:
A. Re-index all the Asset-types (or specifically an AssetType, as per your requirement) in “Configure Global Search”. This operation basically re-indexes all the existing assets in the system and generates fresh Indices files.
B. If the issue still persists, it most likely means that the Lucene configurations are corrupted, resulting in invalid indices, so execute the steps below. Make sure you take a backup before operating upon the artifacts.
1. Login to Sites Explorer and Navigate to IndexSourceMetaDataConfig table.
2. Find the record with name=”Global”, delete the record, and save the change to the table.
3. Right-click in the right window of IndexSourceMetaDataConfig to create a new record.
4. Add data to each column, as listed below, and save the record.
— id = 1
— name = Global
— uniqueid = id
— defaultsearchfield = DefaultSearchField
— searchenginename = lucene
— sortablefields = name;
— urldescriptor ==>> click on the rectangle to create a new file and enter the below values in the popup and click ok.
Filename = global
Type/Ext = .txt
Enter the below value in the opened global.txt file
— properties = FullTextIndex=true;
Note: Make sure to enter the values as is without any spaces before or after the end of the value when adding to the record in Sites Explorer.
5. Login to Sites UI and Navigate to the Admin tab –> Search and double click on “Configure Global Search”.
If you need more assistance with Lucene search issues, or if you’d like help upgrading your Oracle WebCenter Sites environment from 11g to 12c before the December Premier Support deadline, contact Inspired ECM so our experienced consultants can get your environment running smoothly and successfully today.