Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Forum Search - Proposed Change

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

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

Page: 1
Go to End
Author Topic: 868 Views
  • BLU42 Media
    Avatar
    Community Member
    71 Posts

    Forum Search - Proposed Change Link to this post

    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.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Forum Search - Proposed Change Link to this post

    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.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Forum Search - Proposed Change Link to this post

    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

    868 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.