Similar Items: A globally optimal algorithm for hotspot detection and ranking