[nodebb-plugin-dbsearch] DB Search Plugin


  • I have several comments/requests:

    If any of these are doable? I would like to carry them to GitHub...

    1. In Turkish, we have some letters with accents such as ı,ç,ö,ş,ü,ğ... however since our English keyboard does not contain these letters, it is commonly used with english letters, and for a normal Turkish person the word "cesme" would be easily understood as "çeşme" in a sentence; however dbsearch is making difference with these two words, and therefore we -most of the time- cannot find what we are searching for on the form.

    So, I wonder if it would be possible for this letter to be recognized as their counterpart without accent? Such as

    ı can be also i
    ç can be also c
    ö can be also o
    ş can be also s
    ü can be also u
    ğ can be also g

    It would help us a lot.

    2. When you search a word on the forum it is quite important to write the word correct, however sometimes people make mistakes in their comments/posts/titles and it is not edited later. So for example, when you search for "importan" or "importat" it is never showing you the word "important" or vice versa. I believe a wobbly search would be quite nice, so maybe a long word with one letter mistake is tolerated; so people can find what they are looking for.

    3. Would it be possible to implement a hashtag system to the forum? Unlike most forums, our forum is based on accumulating experiences and knowledge under related title, so creating new topic for something already in the forum is discouraged. This of course causes very long topics, however since tag system only works for the first post and we cannot tag other keywords in the following posts, it is getting harder to find other related stuff (especially #1 issue causes problems with our dbsearch). It would be cool to have a hashtag in or below the post so for example, if people are giving information about "high school" in a "New York" topic, they can tag their post with #highschool and later this can be found very easily with dbsearch or just by clicking the hashtag. I think people also like using hashtags because of social media.

  • Global Moderator Plugin & Theme Dev

    @crazycells this plugin is called "db search" because all it does it use the database's internal search functionality. That's why your first two requests are not possible to implement in this plugin.

    Unfortunately other search plugins are difficult to set up since they require entirely new programs on your server.

    Your third request is just entirely off topic, nothing really to do with the plugin. Personally I think the tagging system deserves a lot of help. I think removing the actual tag fields and instead just parsing post content could be a better system.


  • @PitaJ said in [nodebb-plugin-dbsearch] DB Search Plugin:

    @crazycells this plugin is called "db search" because all it does it use the database's internal search functionality. That's why your first two requests are not possible to implement in this plugin.

    Unfortunately other search plugins are difficult to set up since they require entirely new programs on your server.

    Your third request is just entirely off topic, nothing really to do with the plugin. Personally I think the tagging system deserves a lot of help. I think removing the actual tag fields and instead just parsing post content could be a better system.

    I see, but people are using this to find relevant info on the forum. Right now, google search in the website gives more useful results than the search function of the forum. I think it should be other way around. I would try to do brainstorming if I knew how to do it but unfortunately I am not competent to make plugins. 🙂


  • Additionally, I have forgot to add, so this is #4... A lot of people in our forum are complaining that there is no "search in the topic" function.

    In other old style forums, there is usually a function at the top or below first post where you can only search that topic, however it is missing in NodeBB.

    I think this definitely should be added to NodeBB.

  • Plugin & Theme Dev Community Rep

    There is search in the topic.
    In user settings go to default user settings section and there should be an option to turn it on.
    Each user can also change that setting in his user settings (there is a section with search settings)
    It's not ideal, as it doesn't highlight the searched word and just takes you to the post it was found.

    And as PitaJ said - you can improve the search, but you need to change the search engine from standard db search - as it just can't do what you want it to.
    There is a solr plugin and unfortunately unmaintained elasticsearch one (So it might not work anymore). But I think you need to install solr and elasticsearch first to actually provide them with their backend.

    If there is some light search engine better than database internal search, perhaps making a plugin with it and installing it by default would be better. But I didn't really look into internal search engines so no idea if that's possible or a good idea for default install.

    EDIT: after a quick google search I found lunr.js (and elasticlunr that is supposed to be just lunr with some more functions), and flexsearch as node-based alternatives to solr. No idea if they make sense for this application, but I might try looking into a plugin using one of them after I finish with some other projects (so probably a month from now or more).


  • @oplik0 thanks, unfortunately we cannot use in topic search since our forum is paginated. Currently, it is showing the same result as it would show you do 'find function of the browser', unfortunately this way is not useful for us.

    Thanks for "solr" recommendation, we have actually tried that before in our development forum, but somehow it wasn't working (right now I could not remember what the problem was), but we will look into that further to see if we can use it.


  • Update for #3 hashtag system!

    We found this plugin for hashtags:

    It replaces tags system in NodeBB, and does search with the hashtag. We are still testing but so far looks ok. I think @Andrea-Dragotta made it, so thanks Andrea... we were looking for something like this...

    I suggest this should be an intrinsic property of NodeBB, old tag system should be replaced with modern hashtag system where hashtags can be written anywhere in the text and turn blue, and can be searched as tags.


  • Is there a way to allow the search in the categories too?

  • NodeBB

    @mrmime95 You can seach in different categories on the search page. There is an issue for allowing searching categories in quick search https://github.com/NodeBB/NodeBB/issues/8233

    felagund created this issue in NodeBB/NodeBB

    closed Feature request: search subforum #8233


  • The search works worse with postgres than with mongodb. Not all words are found. I checked on two identical test forums with different databases.
    Partial search does not work on autocomplete with both databases.
    Although this plugin can be considered the most important on the site

    I don't know who came up with this, but the search in the mobile view is hidden so that it is impossible to find it😵
    If you search for something via a mobile phone, then you need to press enter 3 times to start the search💪

  • Community Rep

    @volanar Perhaps Apache Solr is the droid you're looking for for use with PostgreSQL? Non trivial to get set up but does a dandy job. I am unsure about status of nodebb solr plugin. @sharonyue uses it with her stuff, I do believe. I recall she had a couple challenges but iirc eventually got it working. Maybe ping her?

    Edit: Ah, I'd not read the entire thread prior to posting and now note @oplik0 has previously pointed to solr. I'd avoid Elastic Search plugin even if it did work.


  • @gotwf Thanks, I will definitely try. More critical for me is the hidden search button in the mobile view. The search button should be visible in the top menu. It's hard to find her now My friends were testing the site and couldn't find the search button. Now more than 80 percent of traffic comes from mobile devices and this is critical.

  • Community Rep

    @volanar Cool. Be aware that Solr, being a Java app, is a bit fatter than NodeBB. I ran on dedicated vm during my experimenting. Nice full text search results, imho superior to the mongodb option, but the latter was "good enough" for my needs, better supported and much lighter footprint so I stuck with it.


  • @julian Is it possible to display the search icon in the mobile menu in the sticky title menu, as in all top platforms?

Suggested Topics

| |