-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
SimpleFSDirectoryFactory mount a bad route of the index because add the name of the index to _options.IndexesDirectory, and after search the index inside of that folder
Example:
I create a index called 'product's and it produces that I have a index called 'products.index.json' in the folder 'app/indexes'
The problem is that the class SimpleFSDirectoryFactory search that index in the folder 'app/indexes/products' and not 'app/indexes'
The error is this piece of code
public Directory GetDirectory(string indexName)
{
indexName = indexName.ToLowerInvariant();
if (_directories.TryGetValue(indexName, out var directory))
{
return directory;
}
**var path = Path.Join(Path.GetFullPath(_options.IndexesDirectory), indexName.ToLowerInvariant());**
directory = new SimpleFSDirectory(path);
_directories.TryAdd(indexName, directory);
return directory;
}
I think that path must be _options.IndexesDirectory without the join method
Metadata
Metadata
Assignees
Labels
No labels