From c5a0403b1030098c9466ba84a901c1c2ab4ed2f1 Mon Sep 17 00:00:00 2001 From: Jakub Syty Date: Mon, 18 Dec 2023 19:32:15 +0100 Subject: [PATCH] Update indexing.md --- docs/v2/articles/indexing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/v2/articles/indexing.md b/docs/v2/articles/indexing.md index 42043055..34ee2dad 100644 --- a/docs/v2/articles/indexing.md +++ b/docs/v2/articles/indexing.md @@ -116,7 +116,7 @@ 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 (var luceneIndex = (myIndex as LuceneIndex)) +using (var luceneIndex = (LuceneIndex)myIndex) using (var syncIndexContext = luceneIndex.WithThreadingMode(IndexThreadingMode.Synchronous)) { luceneIndex.IndexItem(new ValueSet( @@ -253,4 +253,4 @@ private void IndexCommited(object sender, EventArgs e) { // Triggered when the index is commited } -``` \ No newline at end of file +```