Author Topic: Search algorithm  (Read 2982 times)

Offline Armin M. Küstenbrück

  • Newcomer
  • *
  • Posts: 14
    • View Profile
Search algorithm
« on: February 10, 2021, 04:52:18 PM »
Hi Kirk,
#1 I'm not sure, whether I'm doing it right, but when I search for "caption "Gathof, Daniel"" (for example) it takes minutes to show the results. If I use just ""caption "Gathof"", I receive the results within seconds. How can I search faster for the exact string "Gathof, Daniel"?
#2 When i can't wait for the results and change the app (because I have to check emails or a chat) , the search tab number increase (search 9 = search 10, for example), when I return to PM, and the search starts again at takes again a lot of time.
#3 Similar situation, when I copy ("y" / CTRL-"y") a photo to any folder: after copying, the search starts again and takes a long time, to show the same results.
I'm using Windows 10 and the current version of PM.
Best regards,
Armin

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24764
    • View Profile
    • Camera Bits, Inc.
Re: Search algorithm
« Reply #1 on: February 10, 2021, 05:23:56 PM »
Armin,

#1 I'm not sure, whether I'm doing it right, but when I search for "caption "Gathof, Daniel"" (for example) it takes minutes to show the results. If I use just ""caption "Gathof"", I receive the results within seconds. How can I search faster for the exact string "Gathof, Daniel"?

What happens if you instead search for:

(caption "Gathof") and (caption "Daniel")

#2 When i can't wait for the results and change the app (because I have to check emails or a chat) , the search tab number increase (search 9 = search 10, for example), when I return to PM, and the search starts again at takes again a lot of time.

You can turn off "Rescan on resume" in the Contact Sheet page of the Preferences dialog and resuming won't reissue searches.

#3 Similar situation, when I copy ("y" / CTRL-"y") a photo to any folder: after copying, the search starts again and takes a long time, to show the same results.

This currently cannot be avoided.

-Kirk

Offline Armin M. Küstenbrück

  • Newcomer
  • *
  • Posts: 14
    • View Profile
Re: Search algorithm
« Reply #2 on: February 10, 2021, 05:37:26 PM »
Thank for your very fast answer!

#1 Indeed, this search in two parts is very fast. But it's not exactly the same. This string may find als "Gathof, Nathaniel" and "Mayer, Daniel", if they are on the same photo. And in some photos, I have 5-150 people shown and captioned. So the case of different combinations of first names and last names could happen, especially if there are  members of the same family.

#2 Works! Thanks!

#3 Okay...

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24764
    • View Profile
    • Camera Bits, Inc.
Re: Search algorithm
« Reply #3 on: February 10, 2021, 05:58:43 PM »
Armin,

#1 Indeed, this search in two parts is very fast. But it's not exactly the same. This string may find als "Gathof, Nathaniel" and "Mayer, Daniel", if they are on the same photo. And in some photos, I have 5-150 people shown and captioned. So the case of different combinations of first names and last names could happen, especially if there are  members of the same family.

Your original search should now be faster with the latest build: http://forums.camerabits.com/index.php?topic=13973.0

-Kirk

Offline Armin M. Küstenbrück

  • Newcomer
  • *
  • Posts: 14
    • View Profile
Re: Search algorithm
« Reply #4 on: February 11, 2021, 08:46:48 AM »
Hi Kirk,
thanks a lot for this fast update! Now it works within one or two seconds, after I optimized the SQL database!
Armin

Offline Armin M. Küstenbrück

  • Newcomer
  • *
  • Posts: 14
    • View Profile
Re: Search algorithm
« Reply #5 on: February 17, 2021, 03:04:54 PM »
Hi Kirk,
I've found another problem in the search string:
Searching for "caption 'Brandl, Maximilian'" finds results, "caption 'Brandl, Max'"  doesn't. Is this your intention? Or a bug?
Best regards,
Armin

Offline Bill Kelly

  • Software Developer
  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Camera Bits, Inc.
Re: Search algorithm
« Reply #6 on: February 17, 2021, 04:31:39 PM »
Hi Armin,

Searching for "caption 'Brandl, Maximilian'" finds results, "caption 'Brandl, Max'"  doesn't. Is this your intention? Or a bug?

It is currently working as intended. There is not yet a way to combine wildcard matches with phrase searches. Wildcard matching is on by default when search terms are unquoted.

So: caption max
Would find terms including: max, maximum, maximilian, omnimax

But: caption "max"
Will only find captions including the exact term: max

Unfortunately, this means "brandl, max" cannot find "brandl, maximilian" because a quoted phrase search disables wildcard searching.

In a future build, we may add wildcard syntax to phrase searches, so that one could write, e.g: caption "brandl, max*"

For now, you'll need to be explicit when using phrase searches, like:

caption "brandl, max" or "brandl, maximilian"


Regards,

Bill