Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Search excluding certain keyword(s)  (Read 2518 times)

0 Members and 1 Guest are viewing this topic.

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Search excluding certain keyword(s)
« on: October 27, 2010, 05:10:35 pm »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Search excluding certain keyword(s)
« Reply #1 on: October 29, 2010, 10:19:35 am »

\v^(.*Susan)&(.*Mike)&(.*Charly)@!
Where do you enter that? You cannot enter that in Coppermine's search form.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Search excluding certain keyword(s)
« Reply #2 on: October 29, 2010, 01:43:50 pm »

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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Search excluding certain keyword(s)
« Reply #3 on: October 29, 2010, 01:46:37 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Search excluding certain keyword(s)
« Reply #4 on: October 29, 2010, 02:02:44 pm »

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

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Search excluding certain keyword(s)
« Reply #5 on: October 29, 2010, 05:15:06 pm »

ok, thanks for the hint. seems to me then that there is no operator for negating/excluding a string from the search
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.