forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: CountB on June 24, 2005, 04:13:17 pm

Title: Default boolean search behaviour
Post by: CountB on June 24, 2005, 04:13:17 pm
Hi, hope this is the correct place to put this, I apologise if not.

I'm creating an image archive for my office marketing dept and I need a little help. The default search behaviour with boolean logic seems to be AND, so "woman ripe banana" is the same as "woman AND ripe AND banana". I would like it to default to OR as this generally returns more results. Is this possible?

Thanks!

James
Title: Re: Default boolean search behaviour
Post by: Nibbler on June 24, 2005, 04:21:33 pm
The default already is or, and you can use and, or, and not in your search.
Title: Re: Default boolean search behaviour
Post by: CountB on June 24, 2005, 04:29:50 pm
The default already is or, and you can use and, or, and not in your search.

When I use no booleans I get the same results as and but or gives 'better' results, or seems to.

My users find this confusing so I'm trying to make things easier for them.
Title: Re: Default boolean search behaviour
Post by: Nibbler on June 24, 2005, 04:34:01 pm
Can you post a link and some terms to search for ?
Title: Re: Default boolean search behaviour
Post by: Nibbler on June 24, 2005, 04:37:06 pm
You can try changing incldue/search.inc.php lines 100 and 173

Code: [Select]
$current_match_type = 'and';
to

Code: [Select]
$current_match_type = 'or';
Title: Re: Default boolean search behaviour
Post by: CountB on June 24, 2005, 04:54:09 pm
Can you post a link and some terms to search for ?

Alas not as its intranet based.

I will try your mini-MOD, thanks.
Title: Re: Default boolean search behaviour
Post by: CountB on July 01, 2005, 04:31:58 pm
This now works fine, thanks!