Re-index if search engine files get deleted

This commit is contained in:
Robert McRackan 2019-11-11 16:16:17 -05:00
parent c598576683
commit 0b42b8ee49
9 changed files with 95 additions and 82 deletions

View file

@ -160,8 +160,7 @@ namespace LibationSearchEngine
private Directory getIndex() => FSDirectory.Open(SearchEngineDirectory);
public async Task CreateNewIndexAsync() => await Task.Run(() => createNewIndex(true));
private void createNewIndex(bool overwrite)
public void CreateNewIndex(bool overwrite = true)
{
// 300 products
// 1st run after app is started: 400ms