Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Where are the related questions stored in the database?

+1 vote
274 views
asked Apr 1, 2015 in Q2A Core by halfstone
Hi, I am searching the related answers in the database but canot find them.

I have hundred thousands of questions imported and the recalculating of the related questions (reindexing) takes some days. So I have another idea to calculate them but I cant find them in the database so I don't know where to insert my own calculated related questions.

Can you help me?

Thanks Fabian
commented Apr 1, 2015 by sama55
Do you know qa_suspend_*() functions? These functions are used when processing large amounts of data in own importig program.
Reference:
http://www.question2answer.org/functions.php

1 Answer

+1 vote
answered Apr 1, 2015 by pupi1985
selected Apr 2, 2015 by halfstone
 
Best answer

There is no overhead in the post recalculations regarding related questions as there is no ad hoc structure to hold them.

In fact, they are just dynamically calculated when they are displayed in the widget. The logic uses a score assigned to each question and the score determines how much a question matches a given question. Then the questions with the higher score are displayed.

If you are interested in how the score is assigned you can take a look at the qa_db_related_qs_selectspec function. You'll see the score involves matching words in question titles, tags and categories.

So I wouldn't advise you to go deep in there to decrease post reindexing times.

commented Apr 2, 2015 by halfstone
Thank you for your answer now I understand a little bit more the function of related posts.
...