Umbraco 10 - Using a custom index to index items saved in wwwroot

83 views Asked by At

Following the steps here https://docs.umbraco.com/umbraco-cms/reference/searching/examine/indexing I created a custom index which I can see in back office.

I need to use that index to index items saved under wwwroot/myFolder.

What I had tried was creating custom code which is invoked on the indexProvider.IndexOperationComplete event handler. This does work - sort of. The problem with it is that it runs after every item that gets indexed in the custom code that it invokes.

I tried to count the number of items in the folder and stop the process when it had ran that many times, again it sort of worked but is inconsistent.

Is there a way to 'point' custom indexes to the area you want it to look for things to index, so that when rebuild index is clicked it picks them up and idexes them without any custom code needed?

0

There are 0 answers