You can try to search for Chinese words, visit this link, copy the "测试中文搜索功能" to your forum, and see if you can only search for a single Chinese word, for example, "孔子" only searches for "孔", "曹操" searches for "" 曹" or "操", "blomstra/search" used to be able to search for phrases, but after the latest update, only a single word can be searched.
Blomstra Search, an elasticsearch fulltext search extension
Hi there @luceos this looks like a really useful extension and I am somewhat familiar with setting up Elasticsearch so that's maybe a positive too. Thank you
We have a new Flarum setup we're really happy with, but we'd like to get search to return posts as results, rather than discussions—if it's just discussions, then it's hard to find the right post. Does Flarum built in search or does your Blomstra Search extension support listing search results as posts?
Do you mean "added" as in by forking and altering the code? I could maybe try to do that, I'm a software contractor although PHP is not my thing.
The reason I ask is that the leading complaint on my newly migrated bulletin board (used to be MyBB) is that when you search for a keyword with the out of the box feature, you can't get a list of posts as the results.
Since we have a heap of 1,000+ post discussions with repeated keywords, this is a bit of a pain … being able to filter the results by discussion would be terrific too.
attentive being able to filter the results by discussion would be terrific too.
I think this has been discussed previously as an option for core. A more advanced search component would however be required as currently not even the gambits are visible to users (user:luceos search
for instance), a component that will allow searching within discussions would therefor be needed for this change.
attentive not exactly what you're asking for but this might be useful: https://discuss.flarum.org/d/32017-post-stream-search
Thank you for your responses @matteocontrini and @luceos … yeah I reckon this area will have to see attention longer term for Flarum, I don't think the core search feature is quite good enough currently. We are all loving the platform however (we're using it on our tight-knit, long-lived Arsenal forum that's been going since 2006 or so on an old PHP stack).
I am a bit tied up with my day job at the moment, and perhaps will never have time to work on this, but it seems like something that should be doable with the right combination of Elastic indexers, search criteria, etc.
Hi,
I using this extension for a 500k messages board. I have indexed all my content with ./flarum blomstra:search:index --recreate
, since the rebuild with index creation I have no error in my logs... But I haven't any search result so. My Elastic is open on localhost:9200 and the communication between Flarum and Elastic seem OK. Is there a way to debug index / query ?
Hum... After running ./flarum queue:work
it seem OK... I must start this like a service ?
Other issue.
When I search and display all search results and filter on tag, response is empty. I need to refresh page to display the result. You can try this here: https://forums.fedora-fr.org/t/a-propos-de-fedora-fr?q=badge
- Edited
Another issue, with Syndication...
Is it a Syndication issue or a Bloomstra Search issue ? Is there a way to qucikly disable Bloomstra Search for a route ?
llaumgui Do you have a tracker ? Just for information, if I disable the extension all is OK (but slow).
https://github.com/blomstra/flarum-ext-search I think, but it being reported here is sufficient. Just need some time to look into it.
llaumgui it depends on their implementation, but it can definitely be a search issue. We override the default endpoint so that Elastic can be fully utilized during querying.
- Edited
luceos https://github.com/blomstra/flarum-ext-search I think, but it being reported here is sufficient. Just need some time to look into it.
Thx
The query builder is here: https://github.com/imorland/syndication/blob/master/src/Controller/DiscussionsActivityFeedController.php#L111 It's seem standard. Is there a way to say : "force standard search !" ?
llaumgui The call use the API client: https://github.com/imorland/syndication/blob/master/src/Controller/AbstractFeedController.php#L188 it's a Blomstra Search issue for my point of view.
luceos I look the code of Blomstra Search and I understand that your extension use specific API route:
(new Flarum\Routes('api'))
->get('/blomstra/search/{type}', 'blomstra.search', Api\Controllers\SearchController::class)
->put('/blomstra/search/index', 'blomstra.search.index', Api\Controllers\IndexController::class)
The query used by Syndication (by @IanM) is:
$this->api->withParentRequest($request)->withQueryParams($params)->withBody($body)->withActor($actor)->get($endpoint);
I don't understand how Syndication can be use Blomstra Search... But:
- if I stop my Elastic service I have a connection issue.
- If I start Elastic (index is OK), I have no result.
- If I disable Blomstra Search, all is OK.