Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,Is it possible to manually/programmatically start the indexing process of the RavenDB(Same process that start when you push the magic button in backoffice) ?I tried accessing UCommerce.Search.Indexers.ScratchIndexer without any luck. Any help is appreciated!
yes, using the following line of code:
ObjectFactory.Instance.Resolve<ScratchIndexer>().Index();
This is the following we use to index on a background thread when pushing the button:
protected void BeginIndexFromScratch_OnClick(object sender, EventArgs e) { new Thread(DoWork).Start(); BeginIndexFromScratch.Enabled = false; IndexerStartedLabel.Visible = true; IndexerStartedLabel.Text = GetLocalResourceObject("IndexStarted.Text").ToString(); } private void DoWork() { ObjectFactory.Instance.Resolve<ScratchIndexer>().Index(); }
Hope this helps in the right direction
Best regards
Morten
is working on a reply...
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.
Continue discussion
Programmatically start indexing RavenDB
Hi,

Is it possible to manually/programmatically start the indexing process of the RavenDB
(Same process that start when you push the magic button in backoffice) ?
I tried accessing UCommerce.Search.Indexers.ScratchIndexer without any luck.
Any help is appreciated!
yes, using the following line of code:
ObjectFactory.Instance.Resolve<ScratchIndexer>().Index();
This is the following we use to index on a background thread when pushing the button:
Hope this helps in the right direction
Best regards
Morten
is working on a reply...
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.