Sitecore Search Efficiency with Re-Indexing and Custom Indexing

We are located on Sitecore 6.4 and use the advanced advanced search module with extended source code and see a big degradation in the site search results when the Sitecore reindex process starts and updates the changes in the web database.

When we start publishing the full site, the indexing manager picks up the changes and processes the history records, which in turn override each element that has been affected. Since this happens for each element, you can see the Lucene index on the disk, changing it when viewing the directory (the number of files grows and changes when viewing).

If you try to search a public website when this happens, the search may take longer to complete; and under heavy load it can take up to 15 seconds before the reindex process is complete.

I see that this process is controlled by the IndexingProvider class. Is there a way to override this class and implement our own?

We examined the search logic and see that the IndexSearchContext object is created each time a search is requested, which in turn creates a new IndexSearcher. We changed some logic so that IndexSearchContext is saved as singlton, which, of course, means that several queries can be served by the same Lucene IndexSearcher. This significantly reduced memory consumption, as using the same crawler is recommended for better performance.

, IndexSearcher. , , reset IndexSearchContext. Sitecore?

5 . , , , ? , , -?

, , , .

EDIT - Sitecore

Sitecore.Search / Lucene . , , . , , / .

dotPeek, , IndexUpdateContext, . DatabaseCrawler , .

, web.config . ( ) , , . Sitecore , .

, IndexingProvider. :

private void UpdateItem(HistoryEntry entry, Database database)
    {
      int count = database.Indexes.Count;
      if (count != 0 || this.OnUpdateItem != null)
      {
        Item obj = database.GetItem(entry.ItemId, entry.ItemLanguage, entry.ItemVersion);
        if (obj != null)
        {
          if (this.OnUpdateItem != null)
            this.OnUpdateItem((object) this, (EventArgs) new SitecoreEventArgs("index:updateitem", new object[2]
            {
              (object) database,
              (object) obj
            }, new EventResult()));
          for (int index = 0; index < count; ++index)
            database.Indexes[index].UpdateItem(obj);
        }
      }
    }

, DatabaseCrawler IndexingProvider.OnUpdateItem; Sitecore.Data.Indexing.Index.UpdateItem? , 6.5, , .

, , DatabaseCrawler , , ; Sitecore.Data.Indexing.Index . - ? , , , , , , , - .

+5
2

:

+2

. , , , .

, , Sitecore Lucene. Lucene "Reopen", , , Sitecore.

, :

  • ,
  • ,
  • " "

Lucene.Net.Index.IndexReader.Reopen

Sitecore.Search.Index.CreateReader()

+1

All Articles