Blomstra Search, an elasticsearch fulltext search extension
Teddan luceos 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.
- Edited
where can I test this extension without installing it, Is there any website already using it?
i have checked previous posts and went to https://sorhadi.net/ to check
i picked a line from this discussion
Yediğimizi mide hazmederken karın ağrısı
when i search using this search not showing any result.
Does flarum or blomstra/search supports full-sentence search?
- Edited
Hari try this site; forum.mutluanneleriz.com please don't link, https://blomstra.community also has it running but that dataset is much less. Mutluanneleriz contains gigabytes on data in elastic.
luceos i have taken this line kaydeden koleksiyonun adını yazsın kaydedeyim
and searched, the search is not showing the below mentioned disucssion
forum.mutluanneleriz.com/?q=kaydeden%20koleksiyonun%20adını%20yazsın%20kaydedeyim
forum.mutluanneleriz.com/d/798517-trendyol-koleksiyon-sadece-burada-paylasabilirsiniz/11
Hari looks like it.
There's definitely room for more tuning and matching mechanisms. I also think it could do with some unit tests. Previous releases of this extension have been mostly about getting data into elastic, improving performance for seeding massive datasets and showing some sensible results.
Nice plugin. Is it possible to index uploaded PDF files (e.g. uploaded via FoF/Upload extension) this way? Or is there another way to do that?
Thanks for the fast answer. Naively I imagined that in uploader I would hook up to the File/WasSaved event and via an ElasticSearch ingester I would put the pdf content into the search index. But being new to Flarum I don't see where I would get the info of where the search would have to point to. Where in Flarum would be the right place to do so?
avandorp Flarum has Search Sources in js. This source would then be added to search, in addition this search source then would need an endpoint that queries elastic for related resources.
Ref:
- DiscussionSearchSource: https://github.com/flarum/framework/blob/main/framework/core/js/src/forum/components/DiscussionsSearchSource.tsx
- DiscussionSearch endpoint: https://github.com/flarum/framework/blob/main/framework/core/src/Api/Controller/ListDiscussionsController.php
Also look at how I extended DiscussionSearch endpoint: https://github.com/blomstra/flarum-ext-search/blob/main/src/Api/Controllers/SearchController.php
Here we are replacing the old search source, you can mimic this by just adding your own files source: https://github.com/blomstra/flarum-ext-search/blob/aabba9c2d0ff90a15be9ddcd1cc257a497d45607/js/src/forum/index.ts#L16
does it work in Chinese forum?
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.