FastPhotoTagger
Metadata Search (Legacy)








This page describes the search facility for FastPhotoTagger v4.0 and earlier.

Search was re-implemented in v4.1. If you are using v4.1 or later the new search facility is recommended. The new search is much easier to use for simple searches and also scales up for more complex searches. Your existing FastPhotoTagger database is fully compatible with the newer search.

The new search is documented here.

To use legacy search, check the box in "Program Settings / Other / Use legacy search."




These are the steps for setting up a database and then searching it

o Choose metadata for database
o Choose photo repositories
o Create the database
o Understand search terms 
o Perform a simple search
o View search results
o Perform more complicated searches
o Copy search results

If you plan to search with hierarchical keywords then
o Setup hierarchical keywords
These operations will be helpful

o Save searches to a file for reuse
o Explore the contents of the database
o Update the database with latest metadata values

When viewing search results
o Use the "Grouped / Merged"  menu
 



Choose Metadata for Database


You have already chosen metadata to work with. Those items appear with text entry boxes on the main application window. In addition, you may choose other metadata for the database that will not have text entry boxes. Typically, these are items you want to search for but never change. Some examples: file creation date, file path, image size, camera settings, GPS data. Specify this metadata on the "Program Settings / Metadata" window with a Size = "none". Check the "DB" checkbox for each metadata item that should appear in the database.






Choose Photo Repositories and Create Database


Specify the folders whose image metadata is to be in the database. Typically, these are top-level folders where photos are stored. (These folders will be searched recursively so images in all subfolders will be included.) To add a folder, on the "Program Settings / Repositories" window, right-click and select "Add Folder". Alternatively, you can simply drag a folder onto this panel. (This does not actually move or change that folder.)

Once you have specified the photo repositories, right-click and select "Update Database". This will create the database by locating every image file in every photo repository and writing your selected metadata to the database. If this takes a long time because of a large number of photos, you can interrupt the process by pressing "Cancel" and later resume where you left off. You must rerun "Update Database" whenever any files in the photo repositories change. FastPhotoTagger does not update the database automatically when you change metadata or add files to photo repositories.

Expect database creation to take one minute for every 5000 images, depending on computer speed and image size. Expect the database to consume 500KB for every 1000 images, depending on the size of the metadata values. The database will be created in the .fastphototagger folder in your user folder.

Please read the notes at the bottom of this page.






Understand search terms


FastPhotoTagger searches are constructed from building blocks called "search terms". To see a search term, click "Search Metadata" on the main application window. A search panel with a blank search term will appear.

A search term has three parts:
1) A metadata selector. Select the metadata tag you wish to use in a search.
2) An operation selector. Select the operation to be applied to the selected metadata tags.
3) A value. Enter the value to be compared to database values using the operation. (If you are using keyword list files, you may right-click to enter checkbox entry mode.)

 

For example, if you want to search for images whose metadata tag "Title" contains the word "Vacation", you would select:
Metadata=Title
Operation=contains
Value=Vacation

 

The metadata selector contains your chosen metadata tags plus three tags created by FastPhotoTagger:

FPTFILEPATH This is the full file path to an image file. Examples:
 on Windows C:\Users\Administrator\Pictures\Animals\dog.jpg,
 on Linux /home/dennis/Pictures/Animals/dog.jpg
FPTMODIFYDATE This is the GMT modification date of an image file in the format YYYY:MM:DD HH:MM:SS. Example: 2012:07:22 22:45:21
FPTVIEWS This is the number of times an image file in the database has been viewed as a result of a search operation.

You may use these tags in your searches.

The operation selector contains these operations:

=
Find images where the metadata tag exactly equals the value
<>
Find images where the metadata tag does not equal the value
>
Find images where the metadata tag is greater than the value
>=
Find images where the metadata tag is greater than or equal to the value
<
Find images where the metadata tag is less than the value
<=
Find images where the metadata tag is less than or equal to the value
starts with
Find images where the beginning of the metadata tag is equal to the value
ends with
Find images where the end of the metadata tag is equal to the value
contains
Find images where the value is anywhere within the metadata tag
excludes Find images where the value is not anywhere within the metadata tag (opposite of contains)
is contained in Find images where the value is in a hierarchical structure in a keyword list file
is not contained in
Find images where the value is not in a hierarchical structure in a keyword list file
count <= Find images where the number of keywords in a metadata tag is less than or equal to the value
count >= Find images where the number of keywords in a metadata tag is greater than or equal to the value


Very important notes:

1. If both the metadata item and the value are numeric then a numeric comparison is done. So, for example, "40" is less than "100". If either the metadata tag or the value is non-numeric then a text comparison is done. Alphabetical or "dictionary" order determines the result of a text comparison. So, "alligator" is less than "apricot" because it appears earlier in alphabetical order. Also, "100" is less than "40x" because "100" appears earlier in alphabetical or dictionary order.

2. The "Descriptive metadata values" setting is ignored by the database. The database will always contain numeric versions of metadata. So, for example, a GPS Latitude will appear in the database as 20 rather than 20 deg 0' 0.00" N.

3. Except for FPTFILEPATH, all comparisons are case insensitive. So, for the search shown above, Titles containing Vacation, VACATION, and VaCaTioN, etc. will all match. FPTFILEPATH is case sensitive.

4. You can leave the value empty and use the = and <> operators to locate images where the metadata tag is empty or not empty. Except for these cases, leaving value empty is ambiguous and not recommended.





Perform a simple search and view search results

Click "Search Metadata" on the main application window. A search panel with a blank search term will open. Select metadata, select an operation, enter a value. Press the "Search Metadata" button on the search panel. If images were found you may click the "Yes" button to view them in the main application window.








More complicated searches


To perform more complicated searches, you must create more search terms and move them around. Use a search term control button to create search terms. Use the mouse to select search terms and move them around.


Here is a slightly more complicated search.


 

Search terms in a row are connected by the logical AND. This means that only images satisfying all the search terms on the row will be found.

Adding one more search term:

    

Note that the middle search term doesn't say "year is greater than 2010". It says that alphabetically, the date must be greater than "2010". So, "2010:01:01 00:00:00" and all the other dates and times in 2010 satisfy the search term.

Here is a search with two rows of search terms.



Entire rows of search terms are connected by the logical INCLUSIVE OR. This means that each row is treated as a separate search and the results of all the separate searches are combined.



Searches with hierarchical keywords are described here. Searches using "is contained in" and "is not contained in" are described here.





Copying Search Results


Once you've found your photos of interest, you can copy them to a file explorer window. Select one or more images and either issue the keyboard copy command (^C) or drag the images to a file explorer window. (Some file explorers may offer you the option of moving the files, however FastPhotoTagger is not designed to support moves. Do not move files from the main application window).

The commands "Rename", "Copy to", "Move to", and "Delete" may also be used. (Renaming or moving will make a file unsearchable until you "Update Database" again.)

You may also copy your photos of interest as a captioned slideshow. Set the slideshow options using "Program Settings / Slideshow" then copy the slides to the filesystem using "Program Settings / Other / Export Slideshow".





Saving Search Definitions to a File


Click "Save to a Search File" to write a search definition to a file for later use. The search definition will be saved in a text file in XML format. Click "Open a Search File" to load the saved search definition.

  




Exploring the Metadata Database


The bottom area of the Search Metadata window contains a simple explorer for viewing metadata values in the database. Use the metadata explorer to get an overview of database contents. This is a handy way to find spelling or case errors in metadata that you can correct using the Metadata Inspector or other FastPhotoTagger facilities.

Using the FPTVIEWS and keywords tags here and searches using keywords "count <=" and "count >=" may help you discover why certain files never show up as the results of searches.

 

The explorer has four parts:
1) A metadata selector. Select the metadata tag whose values you wish to view.

2) Filter text. Optionally enter text and press "Enter." The filter acts similar to the "contains" operation in a search term. Metadata values that have the filter string within them will be displayed. Filtering is iterative, i.e., filtering is applied to the previous filter if there was one. Re-select the metadata selector to remove filters.

3) The filtered metadata values for the chosen tag and filter. Metadata values are presented as keywords or full field values that are present somewhere in the database for the chosen tag and filter. A use count is appended to each keyword/value, e.g., "Paris#0251" means the Paris keyword appears 251 times in the database. You may copy (^C) from the results window and paste into a text editor for printing or analysis.

4) Command buttons:
-- Press the Search button to search the database for the values contained in the filtered results.
-- Press "FPTVIEWS=0" to reset view counts for all files back to zero.
-- Press "CSV" to export the entire metadata database to a comma separated value file with character format UTF8 and tab delimiters. The file is named "export.csv" and is located in the folder containing the metadata database. (The default location is the .fastphototagger folder.) This operation may be quite lengthy and cannot be interrupted.





Some Notes

The metadata database does not include information about files added or changed since the last "Update Database" command. This includes files changed by FastPhotoTagger that are in the Pending Changes list. You must rerun "Update Database" whenever the contents of the photo repositories change.

When you add metadata to "Program Settings / Metadata" you must rerun the "Update Database" command. All files in all photo repositories will have to be processed.

When you add or change files in the photo repositories you must rerun the "Update Database" command. Only the new and changed files will have to be processed.

The metadata database is accessible by only one FastPhotoTagger program. A second, simultaneously running FastPhotoTagger program will not be able to access the database.