Skip to content

Commit

Permalink
Fix docs for synchronous index building
Browse files Browse the repository at this point in the history
  • Loading branch information
jakoss committed Dec 18, 2023
1 parent 03d208b commit f82ae8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/v2/articles/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ myIndex.IndexItem(new ValueSet(
Be default all indexing is done asynchronously. If you need to run indexing synchronously you should create a synchronous scope. This is for instance a necessary step for unit tests.

```cs
using (myIndex.ProcessNonAsync())
using (var luceneIndex = (myIndex as LuceneIndex))
using (var syncIndexContext = luceneIndex.WithThreadingMode(IndexThreadingMode.Synchronous))
{
myIndex.IndexItem(new ValueSet(
luceneIndex.IndexItem(new ValueSet(
"SKU987",
"Product",
new Dictionary<string, object>()
Expand Down

0 comments on commit f82ae8c

Please sign in to comment.