Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Forum Search - Proposed Change


Reply


3 Posts   892 Views

Avatar
BLU42 Media

Community Member, 71 Posts

11 July 2008 at 3:30pm

I would like to propose a change to the Forum Search Function. By adding an additional snippet of MySQL code: "IN BOOLEAN MODE". This would certainly enhance the ways we can search through the forum, especially + and - functionality plus allowing a search by phrase in double quotes.

I ran several tests locally, inserting the new code in the SearchResults() function in the ForumHolder.php file:

.
.
.
      return DataObject::get("Post",
         "MATCH (Title, Content) AGAINST ('$SQL_query' IN BOOLEAN MODE) $SQL_authorClause",
         "MATCH (Title, Content) AGAINST ('$SQL_query') DESC",
         "",
         (int)$_GET['start'] . ', 10');

.
.
.

I would love to get some feedback, particularly from anyone with a larger data set to work with.

Avatar
Sam

Administrator, 685 Posts

14 July 2008 at 6:24pm

Seems like it could be handy, but it would alter the semantics of the search. We'd probably want to make it a config option.

Avatar
Hamish

Community Member, 712 Posts

14 July 2008 at 8:34pm

By the way, I posted this before, but it make NO sense that the forum search finds "a OR b OR..." instead of "a AND b AND..." when searching for multiple terms.

It's far more common to want to refine your search with multiple words than to widen it.

For a start, it would make this forum a heck of a lot more useful. It's almost impossible to find answers to anything but the most basic problems that have been dealt with before.

Thanks