FastPhotoTagger
Metadata Search








If you have a large photo collection, you may struggle to find a particular image when you need it. If you have taken the time to tag your photos with FastPhotoTagger or some other tool, or if camera-created metadata is the key to finding the image then you will benefit from FastPhotoTagger's database and search facility.

Search was re-implemented in v4.1. This page describes the search facility for FastPhotoTagger v4.1 and later. (The search facility for v4.0 and earlier is still supported and is documented here.)

FastPhotoTagger search on PCs is highly compatible with FastPhotoTagger search on Android. Database creation and management are different, but the user interface is very similar and search files and search history are interchangeable between the systems.





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 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 (find misspelled keywords)
o Notes on updating the database with latest metadata values

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



Choose Metadata for Database


Chose your metadata in "Program Settings / Metadata". Those items will appear with text entry boxes on the main application window. Check the "DB" checkbox for each metadata item that should appear in the database.

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, image size, camera settings, GPS data. Specify this metadata on the "Program Settings / Metadata" window with a Size = "none".

You may want to set certain metadata fields but never search for them. Some examples: Copyright, Creator. Uncheck the "DB" checkbox for these items.





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 default database location is the .fastphototagger folder in your user folder.

Please read the notes at the bottom of this page.






Understand search terms and simple searches


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.



The search term shows input fields for all the metadata tags you have chosen for the database plus two fields created by FastPhotoTagger. You may enter search values into one or all of them. You may perform simple and fairly complex searches with a single search term.

Here are some examples:

1. Search for photos with the keyword "Jack." Press the Search button to perform the search.



2. Search for photos with either "Jack" or "Jane" keywords.



3. Search for photos with both "Jack" and "Jane" keywords. The + requires both keywords to be present in the same photo, just like logical AND.



4. Search for photos of Jack in Paris. Rows of the search term are connected by logical AND. Photos of Jack in London will not be found.



5. Search for photos of Jack or Jane in Paris or London.



Here are more examples:

Search for
Finds
Comment
dog
dog, DOGS, hotdog
Find dog as substring of any words
dog cat
dog, doge, cats
Find dog or cat as substring of any words
"dog food"
dog foodstore
Find dog food as substring in any sequence of words
{dog food}
dog food
Find dog food as whole words in any sequence of words
+dog +cat
dog cat
Require both dog and cat as substrings in any sequence of words
+dog -cat
dog
Require dog but forbid cat as substrings in any sequence of words
-cat
animal, dog, ...
Find all values except cat.
+dog cat

Incorrect. Use "dog cat" or "+dog +cat"
>cat
dog elephant zebra
Find alphabetical values after cat
>cat <mouse

Incorrect. Use + to search a range
+>=cat +<=mouse
cat dog mouse
Find values in range of cat to mouse
[animal]
animal dog cat
Find keyword file values at and below animal
+[animal] -[nature]
animal dog cat
Require an animal keyword but forbid all nature keywords
<" "

Find all blank values. <"space"
>=" "
dog cat elephant
Find all non-blank values. >="space"

Here is more information:

o The two fields created by FastPhotoTagger are:

FPTFILEPATH: This is the full file path to an image file. Searches of this field are always case-sensitive. 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

o All searches are case-insensitive except for FPTFILEPATH.
o Relational comparisons are numeric if both the search word and the metadata value are numeric, otherwise a string comparison is performed.
o 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.
o Words within one metadata field are connected by LOGICAL INCLUSIVE OR unless + or - are used.
o Metadata fields are connected by LOGICAL AND.




More complicated searches


Some searches cannot be expressed in a single search term. For those cases, you may create as many search terms as you like. Search terms are connected with logical AND or OR.

Use the plus, minus, and erase buttons to manage search terms. Use the mouse to select search terms and move them around. Use the dropdown menu to select AND or OR.

6. Search for photos of Jack in Paris or Jane in London. Use two search terms connected by logical OR.




If you have more than two search terms, they are evaluated left to right and top to bottom. But AND has a higher priority so ANDs are always performed before ORs, like math where * is performed before +, e.g, 2+3*4 = 14.




Searches with hierarchical keywords are described here. Searches using brackets, [keyword], 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".



Previous Searches


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. Search files are compatible with Android FastPhotoTagger v3.4.

Press the "Recent Searches" button to show the history of (up to 100) searches performed. Load a recent search with a button click. The recent search list is compatible with Android FastPhotoTagger v3.4. The recent search list is stored in your database folder as search.txt. (The default location is the .fastphototagger folder.)

When sharing search files and search history with Android FastPhotoTagger, use the same metadata fields in Settings. The Settings Export/Import operations make it easy to move settings between devices.
 



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.

 

The explorer has four parts:
1) A metadata selector. The metadata selector dropdown menu contains all the tags of the search term plus a special field created by FastPhotoTagger. (FPTVIEWS is the number of times an image file in the database has been viewed as a result of a search operation. This may help you discover why certain files never show up as the results of searches.)

Select the metadata tag whose values you wish to view. Example: Description.

2) Filter text. The filter acts similar to text 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.

Optionally enter text and press "Enter." Example: museum.

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.