Closed SychO9 closed 10 months ago
Part of #3884 (https://github.com/flarum/framework/issues/3884#issuecomment-1747042916)
Changes proposed in this pull request: Introduces a search driver API. (Checkout the POC here: https://github.com/SychO9/flarum-ext-search/blob/main/extend.php#L40-L48).
(new Flarum\SearchDriver(Search\ElasticSearchDriver::class)) ->addSearcher(FlarumDiscussion::class, Discussion\DiscussionSearcher::class) ->addFilter(Discussion\DiscussionSearcher::class, Discussion\PrivateFilterMutator::class) ->addMutator(Discussion\DiscussionSearcher::class, Discussion\PrivateFilterMutator::mutate(...)) ->setFulltext(Discussion\DiscussionSearcher::class, Discussion\FulltextFilter::class), (new Flarum\SearchIndex()) ->indexer(FlarumDiscussion::class, Discussion\DiscussionIndexer::class) ->indexer(FlarumPost::class, Post\CommentPostIndexer::class),
SearchState
template
Follow up PRs The follow up PR will include
Necessity
Confirmed
composer test
https://github.com/flarum/framework/pull/3893
Part of #3884 (https://github.com/flarum/framework/issues/3884#issuecomment-1747042916)
Changes proposed in this pull request: Introduces a search driver API. (Checkout the POC here: https://github.com/SychO9/flarum-ext-search/blob/main/extend.php#L40-L48).
SearchState
implementation. (use of phpstantemplate
for generics helps with typings here).Follow up PRs The follow up PR will include
Necessity
Confirmed
composer test
).