Searching is hard... Pt. 1

NodeBB Blog
  • GNU/Linux

    Note: This blog post is part one of a two-part series. The second part has not been posted yet.

    I won't mince words — searching for things is hard. It ranks up there with password hashing, and given the opportunity, I'd farm out the process to a library that I know does the job.

    Nobody I know personally has built a search index by hand, because it'd be a complete waste of time (especially since you'd be reinventing the wheel trying to solve a problem that's been solved multiple times already). So where does that leave us when it comes to forum software?

    Click here to see the full blog post

  • #2

    Ooooh, I had a suspicion there was something going on behind the scenes for search...

    Solr seems to take up too much memory to be the default search, wonder what will emerge.

  • #3

    I'm not a programmer, so I don't know what's involved, but is it that difficult to implement a search feature like what's available on Stack Overflow, Discourse and AskBot?

  • #4

    @planner I believe stack overflow use elasticsearch, not sure about the other two though.

  • GNU/Linux

    @planner From what I can tell, Discourse uses full-text searching built into their PostgreSQL database. Solr is like that, but with the advantage of being a discrete app from the forum itself

  • #6

    I just posted my partial translation on our NodeBB Chinese forum. Will continue going when @julian has more update.

  • GNU/Linux

    @zenkamal said:

    Solr seems to take up too much memory to be the default search, wonder what will emerge.

    Solr also requires a hard dependency (need to install via apt or compile from source) and configuration, which makes it an automatic no-go for default inclusion in NodeBB.

    Unless Reds phonetic search is loved by everybody, dbsearch will most likely be summarily executed from the package.json (sorry @baris 😄), meaning dbsearch and solr would be options for extending your NodeBB install.

  • #8


    MongoDB has support for full text search. Has any consideration being given to making MongoDB the default DB so that the system can take advantage of its text search feature?

    Or am I talking gibberish?

  • GNU/Linux

    As far as I know, Mongo only does full-text search if a specific config option is set to true, and that option is not set to true by default. Plus, large parts of NodeBB are optimized for Redis 😄

  • #10

    testing 🙂

    EDIT: works perfectably

Suggested Topics

| | | |