#94 Allow AND operator in search.pl


This allows users to search for all of a list of search
terms instead of displaying stories which match any of
the words. The default operator is still OR, but
search.pl contains a new dropdown which can be used to
select AND instead. This default can be changed with a
simple edit to search.pl by modifying the line where
$form->{boolean_type} is initialized. Only story
searching is fixed with this patch, but it would be
easy to extend to other searches.

On the site I tested this patch, story_text has 5,590
rows, and is 11.6 MB. Normal searches took about 0.3
seconds, and AND searches about 1.3 seconds. This load
increase should be acceptable for most sites running slash.

Eventually this and other search options should be
implemented using IN BOOLEAN MODE fulltext searching, a
feature added to MySQL in version 4.0.1 (see
http://www.mysql.com/doc/en/Fulltext_Search.html\), but
this patch will work until then.


  • Anonymous - 2003-04-22

    Patch to searchform;search;default, search.pl, and Search.pm

  • Chris Nandor

    Chris Nandor - 2003-05-12
    • assigned_to: nobody --> krow
  • Jamie McCarthy

    Jamie McCarthy - 2003-06-17
    • assigned_to: krow --> jamiemccarthy

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks