Show photos that show two or more specific persons

Say I have several photos showing Peter and/or Paul and have them correctly tagged. I now want to select all photos that show Peter and Paul. Photos that show only Peter or only Paul should not be visible.

Is this possible? I cannot find out how to do this.

Hi,
I will try to explain despite my imperfect English.

  • use advanced search
  • select tags ā€˜Paulā€™ and ā€˜Peterā€™
  • then hit the try button to check if the expected photos are displayed
1 Like

ā€œAdvanced searchā€ works if you want to search the whole collection. Donā€™t forget to make sure you use ā€œIn Allā€, not one of the other combinations.

If you want to filter on the names only in the current album/serach results, you can use the ā€œfilterā€ module in the right sidebar, making sure you use ā€œANDā€ to combine the two tags (ā€œslidersā€ icon at the bottom of the module)

1 Like

Both Advanced search and the filter module work for me.
Now the other way around. Is there a way to show only photos tagged Peter? If I search for that, it gives also the photos tagged Peter and Paul.

Hi,

In the digiKam documentation, I donā€™t found any excluding manner to search like in databases something like that \+Peter AND NOT(Paul) . Maybe combining search tags and group?

A way to explore?

@clinart and @rvietor both methods work, thank you!

didiKam is very powerful, I still have to learn a lot.

You can do that kind of thing with the advanced search and multiple search groups:

  • first one selects ā€œPeterā€
  • second one selects ā€œPaulā€
  • for the second group, make sure combining mode is AND (not the initial OR), and pick either ā€œnone of the following conditions is metā€ or ā€œat least one ā€¦ is not metā€.

I think you can do any search for which you can create a boolean expression. That does not mean itā€™s always easy to create that expression and translate it into search groupsā€¦

1 Like

Hi everyone,
This is a great discussion. Iā€™m working on a new search engine for digiKam, and Iā€™m trying out new ideas. Weā€™ll keep the advanced search as it is now, but Iā€™m experimenting with ideas for expanding the standard search.

From this thread I gather it would be nice to have some type of ā€œNOTā€ operator by using either a NOT keyword or putting a ā€œ-ā€ in front of the term you want to exclude.

Is this correct?

Also, are there other pieces of data that would useful to have in the standard search? A few examples would be including the camera make, camera model, lens, focal length, aperture, and ISO?

What else would you like to see?

Cheers,
Mike
(a digiKam dev)

3 Likes

Hi,
thank you @Michmill .

I donā€™t see any reset search feature in the panel to dismiss all of them. Iā€™ve to open the modify panel to reset any active criteria.
Actually, Iā€™ve saved my search with all criterias.

Thank you for joining Mike.

It would definitely be nice to be able to search for data like filesize, width and height, aspect ratio, maybe all EXIFs anyway?

Regarding the advanced search. Being a dev myself I would like to see a text field that allows me to enter something like this:

Peter and (Paul or Susan) and not Mike

or even:

not (Peter and (Paul or Susan) and not Mike)

But this is probably too much as it would already be some kind of scripting.

Hi Paul,
Since youā€™re a dev, Iā€™ll share some more details. Iā€™m going to borrow some ideas from Natural Language Processing for the new search. While it wonā€™t be a true NLP search, I think some of the tokenization and intent ideas will be useful. digiKam already uses the Boost library, so I can leverage Boost.locale for initial tokenization. I can then add a rudimentary lexical analyzer over the tokenization to allow the user to express more complex search criteria.

Iā€™m open to other ideas and approaches if you have a better idea.

Cheers,
Mike

For me this sounds good!

Best, Karl