Scheduling Lucene Optimization Operations in ISS 2.14+
Configure the ISS 2.14+ optimizeSchedule and optimizeTimeout Search settings to schedule the Lucene index optimization timings for the search index.
Description
In InSite Search 2.14+, system administrators can now configure optimizeSchedule and optimizeTimeout as additional Search.config attributes to control when Lucene index optimization occurs and times out.
The optimizeSchedule setting determines what time the Lucene optimization operation executes. The optimizeTimeout setting determines when the scheduled Lucene optimization operations terminate.
As of ISS 2.13+, the Lucene optimizer runs after every indexing operation. The scheduling settings help to prevent long-running operations that may block subsequent content indexing requests.
Requirements
- The Ingeniux CMS 9.6+ or CMS 10.x site instance and DSS instance must be installed by a site administrator. See Installation & Upgrades for details.
- Ingeniux InSite Search 2.14 must be configured. See ISS Configuration Overview for details.
Step-by-Step
To configure Lucene optimization schedule settings:
- Navigate to [Drive]:\[path-to-dss-site-root-folder]. Open Search.config in a text editor.
Note
The sample Search.config file below doesn't contain all available options, as some options require you to manually add them. See Search.config for details about all configurable options.
<?xml version="1.0"?> <configuration> <configSections> <section name="Search" type="Ingeniux.Search.Configuration.IndexingConfiguration, Ingeniux.Search"/> </configSections> <Search indexLocation="App_Data\LuceneIndex" indexingEnabled="true" queryMaxClauses="1024"> <Hiliter startTag="<strong>" endTag="</strong>"/> <Settings> <add name="defaultIndexingAnalyzer" value="Ingeniux.Search.Analyzers.StemmingIndexingAnalyzer, Ingeniux.Search" /> <add name="defaultQueryAnalyzer" value="Ingeniux.Search.Analyzers.StemmingQueryAnalyzer, Ingeniux.Search" /> </Settings> <IndexingSources> <add name="CMSPublishedContent" type="Ingeniux.Runtime.Search.DssContentSearchSource" settingsFile="C:\dss\pub\settings\SearchSource.config"/> <add name="SearchNav" type="Ingeniux.Runtime.Search.DssContentSearchSource" settingsFile="C:\dss\pub\settings\SearchSource.config"/> <add name="KeyMatch" type="Ingeniux.Search.KeyMatchSearchDocumentSource" settingsFile="App_Data\KeymatchSource.config"/> <add name="IntranetDirectory" type="Cartella.Search.LdapSearchSourceSource" settingsFile="App_Data\ldapSearchSource.config"/> </IndexingSources> <SearchProfiles> <add name="Profile1"> <Sources> <add name="CMSPublishedContent" /> <add name="SearchNav" /> <add name="KeyMatch" /> </Sources> </add> </SearchProfiles> </Search> </configuration>
- Locate the
<Search>
element. Add the following attributes and set the values to best suit your needs.Attribute Description Example optimizeSchedule Schedule the Lucene index optimization operation.
To add a single time value, you can choose from multiple time formats.
To add more than one time value, use the cron time string format.
For example, entering 0 0 2,14 * * ? will run the optimization operation daily at 2 AM and 2 PM.
Entering 0 /20 * * * ? will run the optimization operation every 20 minutes. See the Quartz CronTrigger format for details.
Single time value formats:
- 6:00pm
- 18:00
- 18:00:00
- 21:15:07.0000-07:00
Multiple time value format:
- 0 0 2,14 * * ?
optimizeTimeout Determine a cutoff time to prevent the Lucene optimizer from running. For large search datasets, this setting helps to prevent the optimizer from running during a certain time of day.
This attribute only accepts one time value. You can choose from multiple time formats.
This attribute doesn't validate cron time string formatting.
Single time value formats:
- 2:00pm
- 14:00:00
- 18:00:00
- 14:15:07.0000-07:00
Additional InformationFor example, to use optimizeSchedule in conjunction with optimizeTimeout, you can configure the following:
- Set optimizeSchedule to execute at 10 PM each day when little activity occurs on the site.
- Set optimizeTimeout to cut off operations at 4 AM in case long-running index operations occur overnight that prevent the scheduled optimize task from running.
In this scenario, the additional Search.config attributes display as:
<Search indexLocation="App_Data\LuceneIndex" indexingEnabled="true" queryMaxClauses="1024" optimizeSchedule="22:00" optimizeTimeout="04:00">
When configuring these attributes, keep the following in mind:
- If no new changes exist since the last optimization, Lucene skips optimization.
- If an indexing event occurs and passes the scheduled time, optimization occurs right after the indexing finishes (enqueues).
- If the queue contains index commits, Lucene delays optimization.
- If the attributes contain no values, the system doesn't use optimizeSchedule and optimizeTimeout. Indexing defaults to legacy operations.
- Save Search.config.
Additional Information
- See Search.config for configuration file details.
There are no comments yet.