Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
585 views
in Q2A Core by
edited by
After inserting a large number of Q and A directly into qa_posts, reindexing takes hours... or even days?

1. minute: 750 entries indexed

2. minute: 450 entries indexed

3. minute:  130 entries indexed

....

9th minute 100 entries indexed

.......

( using 90.000 entries in qa_words and 120.000 in qa_tagwords )

 

To much for this script?
Q2A version: 1.5

1 Answer

0 votes
by
The main factor will be the speed of your database - are you using shared hosting?

In any event, you can just leave the reindexing running along in the background - posts are only unindexed shortly before reindexing so search on your site will continue to work fine, even while reindexing is going on.
by
No, I am testing on my own engines. Guess I should do proper importing / inserting data including words and tags. Have to take a look at what indexing is actually really doing. Can I use php/cron for indexing in the background?
by
Yes, you can certainly do it in the background with a little bit of coding - see qa-app-recalc.php from this line:

$posts=qa_db_posts_get_for_reindexing($next, 10);
by
gidgreen, are you aware that reindexing can cause problems on the front end of the site? When I have done it several errors appear on the frontend.
by
I wasn't aware of this - what sort of errors?
by
I don't remember exactly but they may have been locking errors when reading/posting. Or session errors when viewing pages. I'll check and let you know. But it also seems to slow the site down a bit while it's indexing.
by
Perhaps these were the deadlock errors that are now resolved in Q2A 1.5? But yes, it will certainly slow down the site - not much can be done about that.
...