PDA

View Full Version : Advanced Search Bug - unsearchable posts


edgeless
03-29-2016, 01:58 PM
I have just stumbled upon this function-breaking bug that exists within the Advanced Search mechanism on at least the vB 4.2.x platform. The root of the problem may lie within MySQL's functionality and not vB's. I'm unsure. I've tested and confirmed the problem is consistently repeatable on both a publicly live forum site running vB 4.2.x and a privately accessible test forum site running the same. My results have been consistent on both sites.

Description of the Problem
After executing the 'Move Posts' Moderation Tools feature to perform a migration of selected posts within one thread to another existing thread, the migrated posts become unsearchable from that point forward. I have used specific and unique compound words for testing the search mechanism concerning this issue.

Simple Test Setup

1. Create a new thread with the title Test Thread 1 and within the post body, type the string testinstanceone then submit the post.

2. Reply to the newly created Test Thread 1 and within the post body, type testinstancetwo then submit the post.

3. Create a new thread with the title Test Thread 2 and within the post body, type the string testinstancethree then submit the post.

4. Reply to the newly created Test Thread 2 and within the post body, type testinstancefour then submit the post.

Note: You can now go to the Advanced Search interface to confirm that each of the keyword test strings (i.e., testinstanceone, testinstancetwo, testinstancethree, and testinstancefour) will respectively return the threads within which you have placed them.

5. Open Test Thread 2 and tick mark both post #1 and post #2 for moderation.

6. Click Moderation Tools and place the bullet at Move Posts, then click on Proceed.

7. On the Move Posts form, place the bullet beside the "Yes" for Move Posts to Existing Thread and then enter the URL for Test Thread 1 as the destination thread to be merged with.

8. Click the Move Posts button.

9. Go to the Advanced Search interface screen. For Search Types, place a tick mark beside the Posts item. Within the keywords field, type either testinstancethree or testinstancefour and be sure to select the Search Entire Posts option. Finally, click the Search Now button. The following vB message will be returned: "Sorry - no matches. Please try some different terms." There is apparently no way to search for terms/strings within posts that have been moved to other threads in this way. Doing so effectively renders those posts unsearchable.

While many may not consider this unsearchable post creation problem to be huge, I consider it somewhat serious. Depending upon the typical way in which your forum site is used and the functions that its members tend to routinely depend on, this "bug" may cause some issues for a few folks now and again.

If I'm missing something here, please advise.

In Omnibus
03-29-2016, 02:07 PM
Did you try rebuilding the search index?

edgeless
03-29-2016, 02:14 PM
Did you try rebuilding the search index?Yes, I forgot to add that part. But only on the test site (which should be sufficient). And it made no difference.

--------------- Added 1459269814 at 1459269814 ---------------

Update:
Okay, now this is a bit bizarre... I decided to try a search index rebuild on the public forum and now my test strings return their respective forums correctly. I'm wondering two things now: 1) Why didn't the search index rebuild session resolve the issue on the test forum? And 2) will a search index rebuild session be required each time I move posts from one thread to another existing thread?

EDIT:
I'm going to test this and report back.

--------------- Added 1459275058 at 1459275058 ---------------

Final Result
Using different thread titles and different searchable test strings, I've duplicated the new thread creation process on the public forum in order to determine whether, after rebuilding the search index, subsequently moved posts would be searchable. The result is that they are not.

The implication from this result is that each time posts from one thread are migrated to another thread they will remain unsearchable unless and until the search index is once again rebuilt. If this condition is consistently repeatable across vB 4 installations, I certainly consider it to be a bug. I don't think it seems reasonable to be required to rebuild a vB site's entire search index each time posts are moved from one thread to another to make those posts searchable.

If in doubt, please test this on your own vB installation.