From 79d4f999f956bbd6c9ada6d09ea7cbecf352c97e Mon Sep 17 00:00:00 2001 From: Drew Scoggins Date: Fri, 1 Dec 2023 14:19:44 -0800 Subject: [PATCH] Fix namespace collision errors --- .../Services/LuceneIndexManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexManager.cs b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexManager.cs index d66b4be9ca9..22220180478 100644 --- a/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexManager.cs +++ b/src/OrchardCore.Modules/OrchardCore.Search.Lucene/Services/LuceneIndexManager.cs @@ -11,7 +11,7 @@ using Lucene.Net.Search; using Lucene.Net.Spatial.Prefix; using Lucene.Net.Spatial.Prefix.Tree; -using Lucene.Net.Store; +using LStore = Lucene.Net.Store; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using OrchardCore.Contents.Indexing; @@ -362,7 +362,7 @@ private Document CreateLuceneDocument(DocumentIndex documentIndex, LuceneIndexSe return doc; } - private BaseDirectory CreateDirectory(string indexName) + private LStore.BaseDirectory CreateDirectory(string indexName) { lock (this) { @@ -376,7 +376,7 @@ private BaseDirectory CreateDirectory(string indexName) // Lucene is not thread safe on this call. lock (_synLock) { - return FSDirectory.Open(path); + return LStore.FSDirectory.Open(path); } } } @@ -395,7 +395,7 @@ private async Task WriteAsync(string indexName, Action action, bool var config = new IndexWriterConfig(LuceneSettings.DefaultVersion, analyzer) { OpenMode = OpenMode.CREATE_OR_APPEND, - WriteLockTimeout = Lucene.Net.Store.Lock.LOCK_POLL_INTERVAL * 3 + WriteLockTimeout = LStore.Lock.LOCK_POLL_INTERVAL * 3 }; writer = new IndexWriterWrapper(directory, config); @@ -428,7 +428,7 @@ private IndexReaderPool.IndexReaderLease GetReader(string indexName) var pool = _indexPools.GetOrAdd(indexName, n => { var path = new DirectoryInfo(PathExtensions.Combine(_rootPath, indexName)); - var reader = DirectoryReader.Open(FSDirectory.Open(path)); + var reader = DirectoryReader.Open(LStore.FSDirectory.Open(path)); return new IndexReaderPool(reader); });