diff --git a/docs/articles/indexing.md b/docs/articles/indexing.md index 7ad7ca84..bf7b539d 100644 --- a/docs/articles/indexing.md +++ b/docs/articles/indexing.md @@ -115,9 +115,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 = (LuceneIndex)myIndex) +using (var syncIndexContext = luceneIndex.WithThreadingMode(IndexThreadingMode.Synchronous)) { - myIndex.IndexItem(new ValueSet( + luceneIndex.IndexItem(new ValueSet( "SKU987", "Product", new Dictionary() @@ -251,4 +252,4 @@ private void IndexCommited(object sender, EventArgs e) { // Triggered when the index is commited } -``` \ No newline at end of file +```