Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
1.7k views
in Q2A Core by
edited by
Hi,

Due to some reasons I have plenty of duplicate questions. So what is the most system friendly way to remove them.? Please advice.
Q2A version: 1.7.0
by
Delete it from admin area..than recalculate all stuffs..do not delete directly from the database..
by
How to delete it from admin area ? There is no place where we can select multiple questions and delete together. We need to open each question and flag them then only we can delete them right ? It is not easy in my case. There are around 31k questions to remove. Please advice.
by
Unfortunately, there is not option to delete in bulk. You have to do it one by one. I know it's pain in....or you or someone write a plugin for it.

1 Answer

+3 votes
by
 
Best answer
Found a solution myself. Here are the steps :

Wrote a query to hide all the duplicate posts.

UPDATE `qa_posts`JOIN (    SELECT title, MIN(postid) minID    FROM `qa_posts`    GROUP BY title    HAVING COUNT(*) > 1) t2 ON qa_posts.title = t2.title AND qa_posts.postid != t2.minIDSET qa_posts.type = "Q_HIDDEN";

Then delete all the hidden posts in a single click from admin->stats page.

After that re-index the content. You are good to go :)
by
Thanks, UPDATE `qtoaqb_posts`JOIN (    SELECT title, MIN(postid) minID    FROM `qtoaqb_posts`    GROUP BY title    HAVING COUNT(*) > 1) t2 ON qtoaqb_posts.title = t2.title AND qtoaqb_posts.postid != t2.minID SET qtoaqb_posts.type = "Q_HIDDEN";
by
Thanks, work great.
Query OK, 0 rows affected (1 min 14.41 sec)
Rows matched: 6496  Changed: 0  Warnings: 0
by
How delete "hidden posts with Answers"  ?
by
Can you explain the steps to me, I didn't understand
...