Implemented use of LinkedHashSet in search

LinkedHashSet does not allow duplicates but maintains the order of the
elements in the list. This allows the more important elements to be
earlier in the list while not duplicating them if an item matches two
criteria.