I developed Met[A]lbum, short for Metadata Album, which is software to create electronic photo albums. These are Portable Document Format (PDF) files with one image per page along with associated metadata like headline, caption, and date. One feature is the ability to sort images by keyword. However the method of sorting by keyword is not straightforward. I shall describe the algorithm I used.