Author Topic: Use of ^ in searches  (Read 3370 times)

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Use of ^ in searches
« on: May 20, 2022, 04:00:33 AM »
I'm trying to find files where the first character in the filename is H. The terms
filename ^"H"
or
filename ^ "H"
or
filename (^"H")
find 7 files but should find thousands. The found files are files that start h' or h. Files starting with H or h followed by one or more alphanumeric chars are not found.

The terms
filename ^H
or
filename ^ H
or
filename (^ "H")
find everything in the catalog whatever the first character.

What am I doing wrong?

David Hoffman

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Use of ^ in searches
« Reply #1 on: May 20, 2022, 09:34:13 AM »
David,

Your search:

filename ^H

should have found images starting with 'h' or 'H'

I'll have to look into it and get back to you.  I'll try today but I likely won't finish and provide a fix until I get back from my vacation.

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Use of ^ in searches
« Reply #2 on: May 20, 2022, 09:46:17 AM »
Hi Kirk

Kirk
Quote
Your search:

filename ^H

should have found images starting with 'h' or 'H'

That's what I thought. I'm wondering if the problem is only mine or if others see the same thing (Mac 10.14.6)?

Quote
I'll have to look into it and get back to you.  I'll try today but I likely won't finish and provide a fix until I get back from my vacation.

Enjoy! I can manage OK with sorting.

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Use of ^ in searches
« Reply #3 on: May 20, 2022, 10:47:38 AM »
David,

I think I have an idea what's going on.  There is also a field called 'height' which has aliases 'y' and 'h' and the query parser is thinking that you want to search filename and height from the start of their values but then there are no more parameters and it gets confused.

I'll investigate further.

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Use of ^ in searches
« Reply #4 on: May 21, 2022, 12:01:07 AM »
I think I have an idea what's going on.  There is also a field called 'height' which has aliases 'y' and 'h' and the query parser is thinking that you want to search filename and height from the start of their values but then there are no more parameters and it gets confused.

A search for ^H or for ^Y finds all the 300k images in the catalog. A search for ^J or ^K or ^L (I've not tried all the other letters) finds just a few thousand so I think that may be part of the problem. But the files found in those searches include some of the ones (not all) where the filename only contains the letter being searched, not only those beginning with it.

This can all wait until after your vacation!

David

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Use of ^ in searches
« Reply #5 on: June 15, 2022, 10:12:51 AM »
Hi Kirk - you said last month that you thought you had an idea of what was going wrong with these searches. I see you're back from your vacation, do you think you might take a look and see if there's anything to be done?

Thanks
David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Use of ^ in searches
« Reply #6 on: June 15, 2022, 11:29:38 AM »
David,

Hi Kirk - you said last month that you thought you had an idea of what was going wrong with these searches. I see you're back from your vacation, do you think you might take a look and see if there's anything to be done?

I have come up with a solution.  I'll make you a build if you'd try it out.

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Use of ^ in searches
« Reply #7 on: June 15, 2022, 11:37:37 AM »
Thanks - I'd be glad to.

David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Use of ^ in searches
« Reply #8 on: June 15, 2022, 02:39:11 PM »
David,

Please give this build a try: https://www.camerabits.com/download/PhotoMechanicPlusR6499_b8c6a0f3.dmg

Thanks,

-Kirk

Offline DavidHoffmanuk

  • Sr. Member
  • ****
  • Posts: 315
    • View Profile
Re: Use of ^ in searches
« Reply #9 on: June 16, 2022, 03:29:17 AM »
Hi Kirk

You got it!

^ searches now working perfectly. They seem faster than searches in general but maybe that's just my joy at now having this feature available.

Thanks!
David

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Use of ^ in searches
« Reply #10 on: June 16, 2022, 09:18:24 AM »
David,

You got it!

^ searches now working perfectly. They seem faster than searches in general but maybe that's just my joy at now having this feature available.

Great, thanks for confirming the fix.

-Kirk