7

How does sort by relevance work?

When searching by my tags Intags:mine is:question, relevance is the default option.

The problem is that the results are mostly not relevant; for example the first result is a question that I ask and answered yesterday.

It seems that it takes the latest tags added and finds active questions with as many relevant tags.

I expect to get "active" questions that I didn't ask, answer, or even read yet.

Questions page return newest as default.

Main page return interesting as default.

Why and what is the usage of relevance as the default option?

2
  • Relevant sorts by how well the question matches your query, so it would make sense that it would prefer questions that have as many of your preferred tags as possible. If you want "active" questions, then sort by "active". Aug 23, 2017 at 14:31
  • What is the relevance usage and why is it the default? I'll add more details to my question
    – Ori Marko
    Aug 23, 2017 at 14:37

1 Answer 1

7

Site search is backed by the Elicsearch OSS search engine (source), so I'd expect the relevance to be the ES relevance ranking.

How ES calculates relevance is outlined in a series of blog posts:

Basically, search terms have a relevancy score based on how often they appear in the body or the title, which field they appear in (the title is more relevant than the body), and how many other documents contain the term (too many documents mentioning a word means that word is probably not as relevant). The intersection between your search terms and the matching document then results in an overall score, and the results are sorted by that score.

The algorithm isn't fixed; Stack Overflow can tweak the results by configuring how relevance is applied and boosting or suppressing certain factors. I don't know to what extent they may have done this.

2
  • 1
    Maybe I should ask a different question, but there are hot/active/interesting/active and frequent sorts and only when search intags:mine there's relevance sort
    – Ori Marko
    Aug 24, 2017 at 4:27
  • 3
    @user7294900: That's not a question, that's a statement..
    – Martijn Pieters Mod
    Aug 24, 2017 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .