42

For almost every question there's a list of "related" questions on the right.

How are those questions selected? Is it based solely on tags? Can I do anything if I see a question on the list that is really not related to prevent it from being incorrectly listed?

24
+50

Things have changed a bit since 2009 :-) We rely heavily on Elasticsearch these days. The "related" questions now come from an Elasticsearch "More Like This" query.

Elastic uses tf-idf for most things, which is a standard search algorithm. Their particular implementation is documented here.

  • 14
    Too bad the results aren't very impressive. – tripleee Nov 27 '18 at 7:10
19

Jeff and Joel discussed this on Episode #32 of the Stack Overflow podcast.

Essentially, it's a vocabulary search - which other posts have the same vocabulary as this one.

Of course, there's a lot of tuning involved - the top 10k most common English words are excluded, and tags are included, plus (probably) some magic sauce they haven't revealed.

As far as I've heard, there's nothing you can do if a a question on the list is really unrelated, as the matching is entirely automated, done in real time (no preprocessing, means nothing to tweak).

3

You could listen to Podcast #32 and also be interested in Stack Overflow Search - Now 51% Less Crappy article.

1

They described their process in a recent podcast. If I remember correctly, they use three things: The title, the question body, and the tags. For the question body and the title, they strip out about 10,000 stop words to get the topic. I don't think there is anything you can do to choose what related posts show up other than editing the tags, title, or question.

You must log in to answer this question.

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