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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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