Searching with multi word query does not function as expected

The general search function on my Discourse site is not working as I would expect when I type in multi word queries.

For example: My site has a topic with the title “Two words in this topic title”. When I type “two” into the search bar and hit enter, this topic appears as one of the results, as I would expect. However, when I add another word that is not part of the topic into the search – e.g. “two ex”, “two anything”, etc. – and hit enter, I no longer get any search results.

Even with a multi word query, I would expect to still see the topic listed, since it still matches on the word “two”. Can anyone help fill me in on how Discourse search works, and whether there is a way to adjust it to handle use cases like this? Even if I can’t change anything, just knowing how it’s working and what to expect would be helpful.

I read the code behind the search controller but wasn’t able to answer my question.

Another similar topic here, that also doesn’t answer the question: How to search on Discourse

1 Like


At this time, this isn’t currently possible with the search bar. Here is another topic that had a similar question:

It is possible to search partial words, plurals, or two words that appear in the same topic that aren’t next to each other (however, both words would need to appear in the topic for it to be listed in the results).