1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Further search system refactorings

- Moved search term querying to its own method.
- Updated Large content seeder to be more performant
This commit is contained in:
Dan Brown
2021-11-08 11:29:25 +00:00
parent e1b8fe45b0
commit 9e0164f4f4
3 changed files with 39 additions and 24 deletions

View File

@ -33,8 +33,9 @@ class LargeContentSeeder extends Seeder
$largeBook->pages()->saveMany($pages);
$largeBook->chapters()->saveMany($chapters);
$all = array_merge([$largeBook], array_values($pages->all()), array_values($chapters->all()));
app()->make(PermissionService::class)->buildJointPermissions();
app()->make(SearchIndex::class)->indexAllEntities();
app()->make(PermissionService::class)->buildJointPermissionsForEntity($largeBook);
app()->make(SearchIndex::class)->indexEntities($all);
}
}