Skip to content

Commit

Permalink
Fix namespace collision errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewScoggins committed Dec 1, 2023
1 parent bcf286b commit 79d4f99
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
}
}
}
Expand All @@ -395,7 +395,7 @@ private async Task WriteAsync(string indexName, Action<IndexWriter> 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);
Expand Down Expand Up @@ -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);
});

Expand Down

0 comments on commit 79d4f99

Please sign in to comment.