Search excluding certain keyword(s) Search excluding certain keyword(s)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Search excluding certain keyword(s)

Started by peterlustig, October 27, 2010, 05:10:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

peterlustig

Dear all,

in my keywords I have peoples' names tagged. Is there a possibility to perform a search for photos with Susan and Mike but not Charly in it?

It seems you have to know how to handle regular expressions -- I don't. According to this page http://stackoverflow.com/questions/3883985/vim-regex-how-to-search-for-a-and-b-not-c the syntax should be something like

\v^(.*Susan)&(.*Mike)&(.*Charly)@!


But this doesn't yield any results. Any help would be greatly appreciated.

Cheers, Peter

Αndré

Quote from: peterlustig on October 27, 2010, 05:10:35 PM
\v^(.*Susan)&(.*Mike)&(.*Charly)@!
Where do you enter that? You cannot enter that in Coppermine's search form.

peterlustig

ok, then I misunderstood the new search feature

I gathered from the "Match regular expressions" option in the Search function's dropdown that regular expressions could be used to search the database. In fact, I was just looking for a way to perform searches like 

A AND (B OR C)
(A AND B) NOT (C OR D)

or something similar, and that seems too complicated for the other to dropdown-options of "Match all words (AND)" and "Match any words (OR)".

If "Match regular expressions" cannot be used like this -- which functionality does it add?

Αndré

Oops, sorry. I forgot that we have this option. Will have a look.

Αndré

I'm not sure if that syntax can be used in PHP / MySQL. The MySQL regex function seems to support only basic regular expressions.

peterlustig

ok, thanks for the hint. seems to me then that there is no operator for negating/excluding a string from the search