Try Now
More in this section

Forums / Developing with Sitefinity / Turn off auto index and schedule an update

Turn off auto index and schedule an update

4 posts, 0 answered
  1. James
    James avatar
    3 posts
    12 Sep 2007
    02 Oct 2009
    Link to this post
    Hi there,

    We're using sitefinity 3.2 with about 18 search indexes all with auto index.

    The problem:
    Whenever we update a page within Sitefinity it saves the page fine however it hangs until it times out. Now I believe it is because the site is starting to index the page once it has been saved and hence timing out (although you will have to confirm that).

    If I turn off auto index on all the search indexes is there anyway I can schedule them all to run once a day or something?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    02 Oct 2009
    Link to this post
    Hello Luke,

    If possible try to decrease the number of your indexes or combine them, because you could cause a performance peak. It will be good id you could upgrade to SP1 where we made some improvements to the SeaechEngine.

    Below is a sample code that can be used to run a certain index called TextIndex

         public void StartIndex(string indexName)  
            IndexDataManager idManager = new IndexDataManager();  
            IList Indexes = idManager.GetServices();  
            IndexingServiceInfo indexServiceInfo = null;  
            foreach (IndexingServiceInfo service in Indexes)  
                if (service.Name == "TestIndex")  
                    indexServiceInfo = service;                
            if (indexServiceInfo != null)  
                IndexingService service =  new IndexingService(indexServiceInfo);  
                int timeout = this.Context.Server.ScriptTimeout;  
                this.Context.Server.ScriptTimeout = 4800;  
                this.Context.Server.ScriptTimeout = timeout;  
                throw new ApplicationException("not found name");  

    You can use console application to run the code through the server or create some ticker that will execute the logic on certain time of period.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Devin
    Devin avatar
    149 posts
    09 Jun 2009
    21 Sep 2010
    Link to this post
    I've been having a similar issue with Sitefinity 3.7 SP2.  Can I use the above code to resolve it?

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    22 Sep 2010
    Link to this post
    Hello Devin,

    Thank you for joining the conversation.

    I believe you have submitted a ticket regarding news indexing and a deadlock occurring when you create/edit news items. The issue from your ticket is caused by the index file being locked by other process and the Lucene search indexer not being able to access it.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
4 posts, 0 answered