Optimizing the Search Index

After a large amount of data is content indexed (for example, 1 TB or more), the search index might become fragmented, resulting in slower search performance. To make searches run faster, you can run the optimize command on the search engine index. The optimize command rewrites the entire index and combines the smaller index fragments into a single, large index.

Content indexing jobs will not run while optimization is being performed. However, searches will function during optimization.

Important

For a large index, optimization could take several hours to complete. The optimization process starts when you go to the URL in the procedure. The browser page will appear to be loading until the optimization process is complete.

Before You Begin

  • The disk where the index is located must have free disk space that is equal to the size of the index. For example, if the index you want to optimize is 1TB, then the disk where the index is located must have at least 1TB of free disk space. The optimize command will fail for an index located on a disk without enough free disk space.

  • Ensure that there are no content indexing jobs running on the search engine. Any content indexing jobs scheduled to begin while optimization is in progress will be postponed until after optimization is complete.

  • Locate the Base Port number. Go to the following registry key on the search engine server: HKEY_LOCAL_MACHINE\SOFTWARE\CommVault Systems\Galaxy\Instancexxx\Machines\ServerName\SearchServer\nBASEPORT

    The Base Port number is located in parentheses. For example, a value of 0x00001234(12345) means the Base Port number is 12345.

  • Install the Google Chrome web browser.

Procedure

  1. Log in to the Search Engine client that you want to optimize.

  2. Open the Google Chrome browser.

  3. To begin the optimization, enter the following URL in the address bar:

    http://SearchEngineName:port/solr/update?optimize=true

    where SearchEngineName is the host name of the search engine you want to optimize and port is the Base Port number of the search engine you want to optimize.

    Note

    Depending on the size of the index, the optimization command could take several hours to complete. The browser page will appear to be loading until the optimization process is complete.

  4. In a new browser window or in the original browser window, check if optimization is still running:

    In a new browser window:

    1. In a web browser, go to the SOLR Admin page by typing the following URL in the address bar:

      http://SearchEngineName:port/solr/admin/

      Where searchEngineName is the host name of the Search Engine server and port is the base port number used by the Search Engine.

    2. On the SOLR Admin page, in the SOLR section next to App server, click the Thread Dump link.

      On the SOLR Admin Thread Dump page, if optimization is running, the following information appears at the top of the Full Thread Dump section:

      Lucene Merge Thread

      If this line is not visible at the top of the Full Thread Dump section, optimization is complete.

    In the original browser window used to start the optimization process:

    • The following message appears when optimization is complete:

      <?xml version="1.0" encoding="UTF-8" ?>
      - <response>
        - <lst name="responseHeader">
          <int name="status">0</int>
          <int name="QTime">optimizationTime</int>
        </lst>
      </response>
      • The line <int name="status">0</int> means the optimization completed without error.

      • The optimizationTime is the amount of time the optimization took to complete in milliseconds.

  5. To insert a blank document into the index and reclaim the disk space used by the optimization process, after optimization is complete, enter the following URL in the Web browser:

    http://searchEngineName:port/solr/update?commit=true&stream.body=<add><doc><field name="contentid">deaddoc</field></doc></add>

    Where searchEngineName is the host name of the Search Engine server and port is the base port number used by the Search Engine.

    Note

    If you do not complete this step, the disk space on the Search Engine might appear full after optimizing the index.

Loading...