Author Topic: How to search for one (and only one) person in Persons Shown?  (Read 6275 times)

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Let's say I have photos with the following entries for "Persons Shown":

#1: Fred
#2: Fred, Barney
#3: Wilma, Betty, Pebbles
#4; Fred
#5: Fred, Dino, Barney

Is it possible to search for the photos that have Fred, and only Fred, in the "Persons Shown"?   In other words, only return photos #1 and #4.

I've tried this but it doesn't work:  pershown is fred


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #1 on: April 06, 2021, 10:36:27 AM »
Indy,

Let's say I have photos with the following entries for "Persons Shown":

#1: Fred
#2: Fred, Barney
#3: Wilma, Betty, Pebbles
#4; Fred
#5: Fred, Dino, Barney

Is it possible to search for the photos that have Fred, and only Fred, in the "Persons Shown"?   In other words, only return photos #1 and #4.

I've tried this but it doesn't work:  pershown is fred

We expect that to work.  We're investigating and will get back to you.

-Kirk

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #2 on: April 06, 2021, 11:27:29 AM »
We expect that to work.  We're investigating and will get back to you.

-Kirk

Thank you, that's good to hear.

Preemptive follow-up question:  Once that works as expected would the following search,

pershown is barney fred

work similarly and return only photo #2?


Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #3 on: June 20, 2021, 02:17:38 PM »
Have you had a chance to look at this issue?  I'm still seeing the incorrect behavior in the latest version.

PM+ v6.0, b5820
Windows 10

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #4 on: June 21, 2021, 09:07:07 AM »
Have you had a chance to look at this issue?  I'm still seeing the incorrect behavior in the latest version.

This issue has an entry in our bug tracking system.  It has not been fixed at this time.

-Kirk

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #5 on: June 01, 2022, 01:18:22 PM »
This issue has an entry in our bug tracking system.  It has not been fixed at this time.

-Kirk

Hi Kirk,

It has been a little over a year since this issue was reported and as of the latest version (today) it still hasn't been fixed.

Can you tell me whether you think this will ever be fixed?  Queries such as this was a big part of why I upgraded to the Plus version of PM.  If this will not ever work I need to start looking for an alternative solution.

Plus, you should correct all of your documentation where it states queries such as this are possible.

Thanks,

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #6 on: June 08, 2022, 01:48:42 PM »
Can you tell me whether you think this will ever be fixed?

I guess I'll open this question to anyone at camera bits.  Anyone?

Thanks,

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 973
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #7 on: June 08, 2022, 02:47:05 PM »
Can you tell me whether you think this will ever be fixed?

I guess I'll open this question to anyone at camera bits.  Anyone?

Thanks,

Kirk is currently out of office and has been since prior to your previous post. I will discuss with him when he's back at the computer and if it turns out that this is not something that can be fixed I will update the documentation to indicate the the type of search you are trying to do is not possible on fields that are comma separated lists.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #8 on: June 13, 2022, 07:32:11 AM »
This issue has an entry in our bug tracking system.  It has not been fixed at this time.

It has been a little over a year since this issue was reported and as of the latest version (today) it still hasn't been fixed.

Can you tell me whether you think this will ever be fixed?  Queries such as this was a big part of why I upgraded to the Plus version of PM.  If this will not ever work I need to start looking for an alternative solution.

Plus, you should correct all of your documentation where it states queries such as this are possible.

I'm back from my vacation and I will have a look at this issue this week.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #9 on: June 15, 2022, 10:02:52 AM »
Indy,

I have looked into this issue in depth.  Because of how fields that are 'lists' (things like Persons Shown, Keywords, Caption Writers, etc.) are treated for the purposes of full-text searching, there is currently no way to check if such a field (list fields) contains only one value.

In order to make this possible, additional data would have to be tracked which would necessitate a database schema change (and subsequent database updating/reindexing for all users) and this data would track how many items each of these fields contain.

Then searching like so, would work:

pershown fred and pershown.count = 1
pershown fred barney and pershown.count = 2

Those queries would find only images where Fred was shown (and no one else) and where both Fred and Barney were shown (and no one else).

While I'd like to add such capability, there are higher priority issues/projects to complete before I can perform this work.  I cannot give you an estimate for when this work will be completed.

-Kirk

Offline Indy

  • Member
  • **
  • Posts: 52
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #10 on: June 15, 2022, 07:18:08 PM »
I have looked into this issue in depth.  Because of how fields that are 'lists' (things like Persons Shown, Keywords, Caption Writers, etc.) are treated for the purposes of full-text searching, there is currently no way to check if such a field (list fields) contains only one value.

Thanks for looking into this and for the update.

Offline ejhutch

  • Member
  • **
  • Posts: 50
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #11 on: June 16, 2022, 12:21:12 PM »
Indy,
Likely there is already a way to do your search using regular expressions. I would also like to be able to do this, so if I get a chance, I'll look into what the appropriate syntax for such searches would be.

If I'm not able to post a timely update, you can research how regular expression searching in PM+ works, or perhaps someone else who's got some decent PM+ regex chops could post a suggestion.

Ed

[...]
I have looked into this issue in depth.  Because of how fields that are 'lists' (things like Persons Shown, Keywords, Caption Writers, etc.) are treated for the purposes of full-text searching, there is currently no way to check if such a field (list fields) contains only one value.
[...]
While I'd like to add such capability, there are higher priority issues/projects to complete before I can perform this work.  I cannot give you an estimate for when this work will be completed.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #12 on: June 16, 2022, 12:24:59 PM »
Ed,

Likely there is already a way to do your search using regular expressions. I would also like to be able to do this, so if I get a chance, I'll look into what the appropriate syntax for such searches would be.

If I'm not able to post a timely update, you can research how regular expression searching in PM+ works, or perhaps someone else who's got some decent PM+ regex chops could post a suggestion.

Regular expressions can only be utilized in the Find/Find and Replace panels on images in a contact sheet, they cannot be used a catalog search query.  So it would have to be a two-pass affair, but what Indy is wanting is a direct method via catalog search.

-Kirk

Offline ejhutch

  • Member
  • **
  • Posts: 50
    • View Profile
Re: How to search for one (and only one) person in Persons Shown?
« Reply #13 on: June 16, 2022, 12:28:33 PM »
Hmmm. I could have sworn that I used some kind of regex for a direct catalog search at some point. But if I'm mistaken, I apologize. I'll have to look into this further.

Thanks!
Ed,

Regular expressions can only be utilized in the Find/Find and Replace panels on images in a contact sheet, they cannot be used a catalog search query.  So it would have to be a two-pass affair, but what Indy is wanting is a direct method via catalog search.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to search for one (and only one) person in Persons Shown?
« Reply #14 on: June 16, 2022, 12:52:32 PM »
Ed,

Hmmm. I could have sworn that I used some kind of regex for a direct catalog search at some point. But if I'm mistaken, I apologize. I'll have to look into this further.

Thanks!
Regular expressions can only be utilized in the Find/Find and Replace panels on images in a contact sheet, they cannot be used a catalog search query.  So it would have to be a two-pass affair, but what Indy is wanting is a direct method via catalog search.

There's some simple syntax like anchoring, but there's no full regex engine that can turn into SQL database queries.

-Kirk