Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Prothero 23 posts 106 karma points
    Mar 10, 2014 @ 17:53
    David Prothero
    0

    How to Automate Examine Index Rebuild?

    We have a custom Examine index on some data in SQL Server. It works great. We have a process that bulk loads this data into SQL Server on a periodic basis. We need to rebuild the Examine index after each run.

    Is there some way to automate the rebuild of the Examine index?

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Mar 10, 2014 @ 18:01
    Jeroen Breuer
    0

    Maybe have a lookt at the source code of the Examine Dashboard package. It has a rebuild button. The code tricked behind that button can probably be used for automation as well.

    Jeroen

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Mar 10, 2014 @ 18:13
    Ismail Mayat
    0

    David,

    I had similar issue on a site and I created a webservice then created a console app to call that webservice and then setup windows task scheduler to run that at 2am. In theory you could as Jeroen suggests call the webservice called by examine dashboard using console app and windows scheduler.

    Regards

    Ismail

  • William Parr 8 posts 30 karma points
    Dec 04, 2014 @ 15:17
    William Parr
    1

    Maybe have a lookt at the source code of the Examine Dashboard package. It has a rebuild button. The code tricked behind that button can probably be used for automation as well.

    Jeroen

    Adding to Jeroen's post, I had a look at the Examine Dashboard package and the button they use executes an AJAX call to a file within that package. When you piece it all together you can re-create this call for wherever you'd like. I've placed it in an .aspx file within the Umbraco directory and have set a scheduled task to load this page once a day.

    This is the JavaScript for when you'd like to manually trigger a rebuild of a custom index (using jQuery):

    $.ajax({
      type: 'POST',
      url: '/umbraco/plugins/ExamineDash/Actions.asmx/RebuildIndex',
      data: "{'indexProvider': 'YourCustomIndexer' }",
      contentType: 'application/json; charset=utf-8',
      dataType: 'json'
    });
    

    If all goes well, this call should return a response with the contents: {"d":null}. I've tested it by altering data in my non-Umbraco database, searching for the added data (finding no results), running the .aspx file and executing another search (which subsequently returned the record I had just altered).

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies