Knowledge Base

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.


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.



To configure Lucene optimization schedule settings:

  1. Navigate to [Drive]:\[path-to-dss-site-root-folder]. Open Search.config in a text editor.

    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.

    Search.config Sample
    <?xml version="1.0"?>
            <section name="Search"
        <Search indexLocation="App_Data\LuceneIndex" 
            <Hiliter startTag="<strong>" endTag="</strong>"/>
    			<add name="defaultIndexingAnalyzer" 
    			Ingeniux.Search" />
    			<add name="defaultQueryAnalyzer" 
    			Ingeniux.Search" />
                <add name="CMSPublishedContent" 
                <add name="SearchNav" 
                <add name="KeyMatch" 
                <add name="IntranetDirectory" 
                <add name="Profile1">
                        <add name="CMSPublishedContent" />
                        <add name="SearchNav" />
                        <add name="KeyMatch" />
  2. Locate the <Search> element. Add the following attributes and set the values to best suit your needs.
    Attribute Description Example

    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 * * ?

    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 Information

    For 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.
  3. Save Search.config.

Additional Information

  • PRODUCT: InSite Search
  • Published: April 5, 2021
  • LAST UPDATED: April 7, 2023
  • Comments: 0

Please login to comment


There are no comments yet.