How are the "suggested topics" at the bottom of a thread generated?

In a thread in the general discussion section, there was some commentary made about the search feature:

It got me thinking about how the suggested topics that appear at the end of every thread are generated. For example, there are now several threads dedicated to photos of Bill Woodin’s collection but none of them appear in the suggested topics for each of the threads (see below).

Given that titles are virtually the same, I would have expected the first and third threads to appear here (I cannot recall if there is a fourth thread).