Feedback on our instant search experiment

Recently we’ve embarked on a two-month-long experiment to prototype a new search experience on Discourse.

Please give it a test at https://meta.discourse.org/instant-search

:speaking_head: If you would like to chat about your experience, feel free to schedule a chat over a call Appreciate any feedback :pray:

Features

  • Fast search

  • Ability to search topics, posts, chat messages and users

    • Posts and Topics results include PMs
    • Chat Messages include private channels and DMs
  • UI-based filters for things like tags, categories, users, inboxes, channels, etc.

  • Keyword, Semantic, Hybrid and Hyde search modes

FAQ

Search stops working after a while on the page

Indeed it does; please refresh.

It doesn’t support our search grammar, like @user or #category

Indeed it doesn’t, but it’s something that can easily be added if we decide to ship this.

Topic and Post search targets being distinct is a weird choice

I can see why, especially if you are used to how Discourse search works for the last decade. If we decide to ship this, we could build a mode that does both at the same time, or even simply run both and show them both in the UI. For the constraints of this experiment, this was the easiest way to address both use cases of:

  • I know that this topic exists and just want to find it (Topic search)
  • I want to research any occurrence of this query (Post search)

Results quality isn’t quite there

We barely touched what’s possible here; at the moment, we only prioritize categories and assign weights to title and body. This would need further tweaks to match the refinement we have on the existing search, but also brings the possibilities of going further. Unfortunately, a lot is controlled via the JS API, and the library we are using hamstrung us quite a bit here.

Semantic / HyDE / Hybrid are slow

We added a larger debounce on those to work around some annoyances on the JS library we are using. If we decide to ship this, this JS library is the first on the chopping block. As for the overall speed of those, they depend on two requests, the first one for embeddings, which is running on ancient hardware on AWS, and that doesn’t help. We could also inject embeddings at the middleware proxy for cutting down the latency. Again, experiment time constraints.

Technical details

  • This experiment is using Typesense, an Algolia open-source clone. It’s running in an EC2 instance in the same place as everything else on the Meta hosting.

  • The front-end doesn’t request from Typesense directly; instead, all calls are proxied via the Discourse app, using a Rack middleware.

  • The search bar / results / refinements is using InstantSearchJS wrapped in EmberJS. Unfortunately, this library caused a lot of trouble, and we won’t be using it if we ship this.

  • The server is using 7.35 GB of RAM to index all of Meta. Just keep in mind that most of that is because of embeddings; it would be less than 2 GB without embeddings.

17 Likes

This sounds great. Can you put a link to it somewhere like in the sidebar?

6 Likes

Since AWS is mentioned, wondering if some of the AWS Q features would be a quick and sustainable path to improve search?

2 Likes

This looks great! Speed-wise, it’s quite amazing.

It seems it doesn’t partially match the words in the title.

For example, I’m looking for the topic: Objects type for theme setting.
If I don’t provide a s to object, it doesn’t find the topic.

5 Likes

The keyword option is literal, for looser matches you can try semantic (which looks for similar meaning) or hybrid mode (which does a mix of both):

I think if we were to continue with this plugin it might make sense to default to hybrid because people aren’t really familiar with switching search types like this.

7 Likes

Gave it a quick try and I find it promising. The past days, I searched for the experimental admin bar topic and the restoring backups from command line topic. In the first case, it just took a while to find it in the search results, in the second case, I ended up searching my bookmarks. But the new search brings up both and is a lot faster than the old one. So definitely an improvement for me :+1:

4 Likes

Interesting, can’t wait to explore it further! Looks promising so far!

Could we see something like this eventually replace the full search function entirely? In addition, will this tool serve as an addition to the current search tool in the top toolbar?

3 Likes

Its so cool. Its will have a auto complète option for mobile like elastic search?

3 Likes

Thanks, but my bad on this.
Actually, I did not even see a dropdown list, even though the first post talked about the modes. :derp:

image

It makes sense now :+1:.

I agree. I can’t remember a website where I had to change its search mode.
As a user, I expect a default mode that works well in most situations.


The advanced dynamic filters are truly amazing! It will be super helpful to narrow down searches quickly.

Overall, very good job, team :clap:; I will experiment more on it.

5 Likes

This experiment was made to research the feasibility of re-building our search from the ground up and what are the trade-offs of this new approach. While it’s too early to tell, if the new search experience is received well enough it can then be considered to be integrated into Discourse many search features, be it full page search, inline header search, similar topic search for Related Topics, user mentions, hashtag autocompletion, etc.

That’s easily doable with this technology, both on mobile and on desktop, much like Google search UI.

Modes only exist for the experiment so people are able to easily compare and test, if this were to ship modes would become an admin option most likely, instead of something user facing.

10 Likes

Love that it’s fast!

I also like the /filter experiment and the way it lays out all my filter options. So seems there’s a couple of directions explored with respect to finding content. Will this come to play together?

What would really simplify things for me if there’s a common language in the end, so as a user I would have a straightforward understanding of:

  • what’s a Search? What’s a Filter?
  • how do I recognize each on the interface, where should I expect to find each?
  • when am I presented a simple/common set of filters? How do I access/expand the full set?
3 Likes

If shipped, the backend for instant search would power /filter. It’s basically the same thing we are already doing in the Topics search in this experiment.

3 Likes

If you don’t mind me asking, for context and so that I know exactly what I’m looking for when I’m testing:

  • What is wrong with the current search today that you’re looking to change or improve on?
  • What are we evaluating here besides speed?
  • If you decide to rebuild search from scratch, is there a chance to have Discourse search search other places of content? e.g. docs not hosted inside of Discourse?
3 Likes

Here are some common issues over the years:

  1. There are lots of complaints about our searching not finding what people are looking for, especially for the use case of
  1. Discourse search doesn’t handle typos at all.

  2. Poor developer experience on existing search leads to it being a second-class citizen, like chat not being searchable yet.

  3. Poor user experience on search for searching PMs.

4 Likes

:bangbang: I have a long list as well, but I wanted to make sure I came in with questions and understanding before I laid on the horn :joy:

I’m really glad to see consideration for improvement. FWIW, while it has work to go, we are constantly told how much our users love our search (aka Discourse search) when comparing it to other search experiences they have, even with its quirks.

As a forcing function, my team is exclusively (at least amongst our own team) using Discourse exclusively to communicate. This was the first request by one of my team members today:

Here’s a couple that come to mind initially:

  • Better search of PMs
  • Searching chat
  • Ability to search (or to extend search) off site would be great. Many communities don’t stop at the Discourse doors.
  • As you mentioned, exact string searches sometimes return odd behavior
4 Likes

This is something we considered heavily when experimenting with an off-the-shelf solution like Typesense. It would make it a lot easier to extend our search to external “documents”, by either allowing customers to inject documents into our database or allowing the front-end to consume from other instances that follow some guidelines to be compatible.

Good thing we got those two right off the bat with the experiment! Thanks for the feedback.

3 Likes

Just to note, we’ve temporarily turned this experiment off. It should be back soon. :crossed_fingers: :slight_smile:

7 Likes

It’s back :eyes:

4 Likes

In addition to your replies here, I’m trying to conduct some short user research interviews to better understand how you use the new instant search

  • Get your general qualitative feedback - what you liked/disliked/would change/like to see in the future
  • How the experience compares to our current search
  • See you in action using the new search

My DMs are open if people are willing to chat over a call! Appreciate any feedback :pray:

6 Likes

Another small hiatus :palm_tree: Be back soon. :slight_smile:

2 Likes