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?
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.
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.
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):
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).
For an Umbraco CMS 8.14.0 website with a custom Examine Index called MyEventsIndex I created a recurring task that runs every hour to rebuild the index.
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?
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
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
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):
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).For an Umbraco CMS 8.14.0 website with a custom Examine Index called MyEventsIndex I created a recurring task that runs every hour to rebuild the index.
I used this as a guide: https://our.umbraco.com/documentation/Reference/Scheduling/
is working on a reply...