Compare commits
11 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e4590f3ea9 | |
|
|
83c0b0e7ec | |
|
|
3a8559ecca | |
|
|
082892f413 | |
|
|
0b9586aee2 | |
|
|
c54d916361 | |
|
|
09c01b3445 | |
|
|
a089698247 | |
|
|
7344fc33b7 | |
|
|
2696fa4dfd | |
|
|
a6d6230553 |
25
README.md
25
README.md
|
|
@ -18,9 +18,32 @@ fulltext search with one that is completely relying on the proven elasticsearch
|
|||
## Installation
|
||||
|
||||
```bash
|
||||
composer require blomstra/search:*
|
||||
composer require sbp/flarum-search
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
This fork is now maintained as `sbp/flarum-search`.
|
||||
|
||||
Intentional compatibility leftovers:
|
||||
- settings keys remain `blomstra-search.*`
|
||||
- some translation keys remain `blomstra-search.*`
|
||||
- CLI command names may still remain `blomstra:*` until a later migration
|
||||
|
||||
Search behavior:
|
||||
- title autocomplete enabled
|
||||
- fuzzy title search enabled
|
||||
- exact + fuzzy content search on full search page
|
||||
- no content autocomplete in dropdown (performance decision)
|
||||
``
|
||||
|
||||
Repository can be found here: https://gitea.muehlberger.net/sbp-jm/sbp-flarum-search
|
||||
|
||||
|
||||
|
||||
|
||||
Enable the extension in the admin area and configure the Elasticsearch endpoint and index name in the extension settings.
|
||||
|
||||
## Setting up the index
|
||||
|
|
|
|||
|
|
@ -18,12 +18,10 @@ return [
|
|||
(new Flarum\ServiceProvider())->register(Provider::class),
|
||||
|
||||
(new Flarum\Frontend('forum'))
|
||||
->js(__DIR__.'/js/dist/forum.js')
|
||||
->extensionID('sbp-seach'),
|
||||
->js(__DIR__.'/js/dist/forum.js'),
|
||||
(new Flarum\Frontend('admin'))
|
||||
->js(__DIR__.'/js/dist/admin.js')
|
||||
->css(__DIR__.'/resources/less/admin.less')
|
||||
->extensionID('sbp-seach'),
|
||||
->css(__DIR__.'/resources/less/admin.less'),
|
||||
|
||||
new Flarum\Locales(__DIR__.'/resources/locale'),
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -22,7 +22,7 @@ export default function extendDiscussionState() {
|
|||
}
|
||||
|
||||
// Construct API search URI
|
||||
const url = `${app.forum.attribute('apiUrl')}/blomstra/search/${this.type}`;
|
||||
const url = `${app.forum.attribute('apiUrl')}/sbp/search/${this.type}`;
|
||||
|
||||
// Make API GET request
|
||||
const results = await app.request({ params, url, method: 'GET' });
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default class DiscussionsSearchSource implements SearchSource {
|
|||
};
|
||||
|
||||
// Construct API search URI
|
||||
const url = `${app.forum.attribute('apiUrl')}/blomstra/search/${this.type}`;
|
||||
const url = `${app.forum.attribute('apiUrl')}/sbp/search/${this.type}`;
|
||||
|
||||
// Make API GET request
|
||||
const results = await app.request({ params, url, method: 'GET' });
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ class SearchController extends ListDiscussionsController
|
|||
});
|
||||
|
||||
$document->addPaginationLinks(
|
||||
$this->uri->to('api')->route('blomstra.search', ['type' => 'discussions']),
|
||||
$this->uri->to('api')->route('sbp.search', ['type' => 'discussions']),
|
||||
$request->getQueryParams(),
|
||||
$offset,
|
||||
$limit,
|
||||
|
|
@ -265,7 +265,7 @@ class SearchController extends ListDiscussionsController
|
|||
]);
|
||||
|
||||
$document->addPaginationLinks(
|
||||
$this->uri->to('api')->route('blomstra.search', ['type' => 'discussions']),
|
||||
$this->uri->to('api')->route('sbp.search', ['type' => 'discussions']),
|
||||
$request->getQueryParams(),
|
||||
$offset,
|
||||
$limit,
|
||||
|
|
|
|||
Loading…
Reference in New Issue