Search function improvement

When users search “bear” in a search function, I suppose that “bear” in the title used to be on the top in search results.
However, now article that includes many “bear” not in the title but in main text is on the top.

I want to let the search function retrieve only from the title.

How can I achieve this?

Add in:title to your search terms to limit searches only to topic titles.

3 Likes

Thanks. But the order of search results is not what I expected.
Do you know the condition of sorting the search results?

I don’t know what you’re expecting the sort order to be, but you can change it with the drop down.

OK, let me explain how I use my discourse.

When I search “discourse” on google for example, “discourse” should be on the top.
“discourse meta ABC” should not be on the top since I just enter “discourse.”

Now I use my discourse as a dictionary. When my user searches “bear”, the search result of “bear” is on the bottom somehow.
Instead, idioms such as “bear up”, “bear the brunt of” and “bar out” are on the top rather than “bear.”

That’s why I want to know how discourse manages the sorting of search results.

Nothing inherently makes the Discourse frontpage more relevant that something else. Google can do what it does because it considers all the links on the whole internet. Discourse isn’t building a map of the internet, but doing text search. It can’t know the difference between all the uses of the word “bear”. It can’t ignore idioms. And when you limit searches to only titles, then it has a lot less to go on - it can determine “relevance” based on the number of times the search terms come up in a whole post, but when you limit it to titles then lots of titles will only have the search term once, and so will be ranked equally.

That said, the “Most Viewed” sorting might help.

1 Like

OK, now I understand how Discourse controls the order of search results.
Thanks for your explanation!