apache / lucenenet

Apache Lucene.NET
https://lucenenet.apache.org/
Apache License 2.0
2.18k stars 627 forks source link

Lucene.Net.Store.Azure.AzureDirectory: Enable usage with a sasuri and existing containers #937

Open haavardeikeland opened 2 months ago

haavardeikeland commented 2 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

No response

Describe the solution you'd like

I'd like the Lucene.Net.Store.Azure.AzureDirectory to be enabled for usage with sasuri with existing containers instead of using the storage account connectionstring. Reason: to constrain access to containers for multiple usages on the same storage account.

Additional context

No response

Shazwazza commented 2 months ago

Hi, Lucene.Net.Store.Azure.AzureDirectory is a 'dead' library and isn't maintained. Much of it has been forked in various repos and attempted to be updated to work. Most people don't fully understand what is actually does though:

What is doesn't do:

What it does do:

The lib isn't maintained because this underlying process has several issues because depending on the index activity, writing this much to blob storage and local storage and keeping it in sync is difficult and can easily cause index corruption issues.

I have a similar implementation in the Examine library that is actively used by tons of Umbraco websites which is stable: https://github.com/Shazwazza/Examine/blob/release/3.0/src/Examine.Lucene/Directories/SyncedFileSystemDirectoryFactory.cs

This doesn't use Blob storage, but just the main file system in Azure App Service (which is a network drive) and syncs to the local %temp% file system.