We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 03d208b + c5a0403 commit 5004b13Copy full SHA for 5004b13
1 file changed
docs/v2/articles/indexing.md
@@ -116,9 +116,10 @@ myIndex.IndexItem(new ValueSet(
116
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.
117
118
```cs
119
-using (myIndex.ProcessNonAsync())
+using (var luceneIndex = (LuceneIndex)myIndex)
120
+using (var syncIndexContext = luceneIndex.WithThreadingMode(IndexThreadingMode.Synchronous))
121
{
- myIndex.IndexItem(new ValueSet(
122
+ luceneIndex.IndexItem(new ValueSet(
123
"SKU987",
124
"Product",
125
new Dictionary<string, object>()
@@ -252,4 +253,4 @@ private void IndexCommited(object sender, EventArgs e)
252
253
254
// Triggered when the index is commited
255
}
-```
256
+```
0 commit comments