Author Topic: Search terms  (Read 4488 times)

Offline adrianlambert

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Search terms
« on: February 27, 2021, 12:08:19 PM »
I'd like to specify the path in the search terms. The path in question has spaces. Do I need to escape\ them? Also can I specify a part of a path rather than the whole thing?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Search terms
« Reply #1 on: February 27, 2021, 02:27:58 PM »
Adrian,

I'd like to specify the path in the search terms. The path in question has spaces. Do I need to escape\ them? Also can I specify a part of a path rather than the whole thing?

To find a partial path (left-anchored) :
path ^"/Somewhere/with spaces/"

To find an exact path:
path is "/Somewhere/with spaces/"

To find a path (right-anchored) :
path "with spaces/_MG_1234.JPG"$


Offline adrianlambert

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Search terms
« Reply #2 on: February 27, 2021, 04:14:46 PM »
Thank you. Must the anchored right path end with the filename or is the directory sufficient? And if it’s the filename, what use is this?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Search terms
« Reply #3 on: February 27, 2021, 06:07:08 PM »
Adrian,

Thank you. Must the anchored right path end with the filename or is the directory sufficient? And if it’s the filename, what use is this?

If you're searching the path and right-anchoring then yes, you'd need to include the filename.  The path includes the filename.  Right-anchoring would then require the filename for a match.

Can I ask what it is that you're trying to accomplish?  Sometimes that works out better for me to provide you a solution.

-Kirk

Offline adrianlambert

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Search terms
« Reply #4 on: February 28, 2021, 02:04:48 AM »
I want to search for all images taken in a specific city that were within a set of folders pertaining to commissioned shoots.

The paths are:
/Volumes/Archive 01/
/Volumes/Archive 02/
/Volumes/Archive 03/
And the city is Manchester.

So the search query would be:
city "Manchester" AND path ^"/Volumes/Archive 01/" OR path ^"/Volumes/Archive 02/" OR path ^"/Volumes/Archive 03/"?



Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Search terms
« Reply #5 on: February 28, 2021, 10:15:56 AM »
Adrian,

Use:

city "Manchester" AND (path ^"/Volumes/Archive 01/" OR path ^"/Volumes/Archive 02/" OR path ^"/Volumes/Archive 03/")

Or you may find the Filter system easier.  You could create a Folder Path filter, selecting the three paths (command-click them).  Then a IPTC->Location (Legacy)->City filter and select Manchester.

-Kirk

Offline adrianlambert

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Search terms
« Reply #6 on: February 28, 2021, 02:37:49 PM »
Thanks Kirk, I was trying to use the filter but to be frank the app hasn't been running very well so I wasn't sure whether I was understanding the correct procedures. Seems that I was doing the right thing but the system was so bogged down by ingesting/scanning/preview generation that the searches, filters, and browsing was just so slow as to have me thinking I was doing something wrong.

A little more detail on the documentation page for searches might be useful. The brackets you used for the path part of the query and the path query itself aren't discussed in either the user pages https://docs.camerabits.com/support/solutions/articles/48001077445-photo-mechanic-plus-search or the example searches in the app.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Search terms
« Reply #7 on: March 01, 2021, 09:19:58 AM »
Adrian,

Thanks Kirk, I was trying to use the filter but to be frank the app hasn't been running very well so I wasn't sure whether I was understanding the correct procedures. Seems that I was doing the right thing but the system was so bogged down by ingesting/scanning/preview generation that the searches, filters, and browsing was just so slow as to have me thinking I was doing something wrong.

A little more detail on the documentation page for searches might be useful. The brackets you used for the path part of the query and the path query itself aren't discussed in either the user pages https://docs.camerabits.com/support/solutions/articles/48001077445-photo-mechanic-plus-search or the example searches in the app.

This example from the Search Examples window illustrates using parenthesis in a query:

(width >= 1280 and height >= 960) or
  (width <= 128 and height <= 64)

(You may have to scroll down to see it.)

-Kirk