• Extensions
  • 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.

    Aaro-n ohhhhh yes . I can search for single Chinese character….. is there any way to support phrase?

    Aaro-n is the latest version referring to flarum 1.3.0 or the latest version of the the extension?

      Teddan I think he means of the extension. I haven't seen or heard any reports about this though.

        Teddan yeah absolutely. I will need to find a solution to that, but I think it's similar to the fix of core.

          a month later

          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?

          https://imgur.io/a/LwziYgK

            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.

                5 days later

                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?

                  avandorp it is possible, but getting there is not done with the flick of a hand. Flarum itself has no mechanism yet to search files, so that would be step 1. Then one would need to sync uploads (or rather their information) to elastic.

                  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:

                    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

                    3 months later

                    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.