Move query-to-index-key code out of findMulti

Change-Id: I2c5c0ee8aefb4c688b552df3a4d8ad60a27fb917
Merge "Move query-to-index-key code out of findMulti"