php - Related Questions Algorithm


SOF Related Questions Algorithm is a very good. Can anyone tell me the algorithm like this. EX a mysql query.




In a nutshell:

StackOverflow gathers the keywords from a question, queries it against Googles 10,000 most common words and then continues on to do a FULLTEXT search with the remaining words.

Although this could very well be some elaborate myth. If someone could clarify...




I don't know how SO works, specifically, but you can treat the question as a query and run it through a search engine. In practice, it's impractical to push the entire question in as a query, so you build a probability histogram of the words found in the question, compare it with the histogram of the complete database, and search on words who's probability within the question substantially exceeds their probability within the database. This is known as Naive Bayesian search.

There is a whole lot more to this subject than I've described, and certainly more than you squeeze into a nice tidy SQL statement. See here for a more thorough exposition.

People are also looking for solutions to the problem: php: alphabetically sort multi-dimensional array by its key?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.