MyBB Community Forums

Full Version: Thread subjects FULLTEXT not applied.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The following piece of code seems wrong:
// Check if we need to create our fulltext index after changing the search mode
if($mybb->settings['searchtype'] != $mybb->input['upsetting']['searchtype'] && $mybb->input['upsetting']['searchtype'] == "fulltext")
{
	if(!$db->is_fulltext("posts") && $db->supports_fulltext_boolean("posts"))
	{
		$db->create_fulltext_index("posts", "message");
	}
	if(!$db->is_fulltext("posts") && $db->supports_fulltext("threads"))
	{
		$db->create_fulltext_index("threads", "subject");
	}
}

I had to manually set the FULLTEXT search for thread subjects because it wasn't being updated when modifying the setting.
Can't reproduce on a clean install, both indexes were set for me. What's your MySQL version?

But changing it back to Standard doesn't remove the fulltext indexes, which is another bug.
IIRC:
if(!$db->is_fulltext("posts") && $db->supports_fulltext("threads"))

Should be:
if(!$db->is_fulltext("threads") && $db->supports_fulltext("threads"))

I fixed it but can't remember what line the issue exactly was in.
While I haven't checked whether the indexes are created I haven't found any code so far which handles dropping the indexes so pushing this.
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2056

Thanks for contributing to MyBB!

Regards,
The MyBB Group