db.retrieve: search by file, by flag type, or both