How about a HashMap> ?
Hashmap has photo name as key, list of keywords as value.
Get list of keywords for a photo is trivial, list of photos for a keyword is easy using contains(keyword) on each of the keyword lists in a loop.
JamesCherrill
Posting Genius
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073