conditional re-index

This commit is contained in:
Robert McRackan 2021-09-23 14:44:11 -04:00
parent 14e14ba9bd
commit f29968f379
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Version>6.0.6.1</Version> <Version>6.0.6.2</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -275,8 +275,9 @@ namespace LibationWinForms
} }
// in order: save to db, full reindex from db, refresh ui // in order: save to db, full reindex from db, refresh ui
context.SaveChanges(); var changed = context.SaveChanges();
ApplicationServices.SearchEngineCommands.FullReIndex(); if (changed > 0)
ApplicationServices.SearchEngineCommands.FullReIndex();
UserDefinedItem.BatchMode_Finalize(); UserDefinedItem.BatchMode_Finalize();
// only do this after save changes // only do this after save changes