0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-11 11:25:38 +00: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
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
3 changed files with 39 additions and 24 deletions
database/seeders

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);
}
}