Similar Items: Selective Inference with Distributed Data