Allow query with array of documents to be inserted

refs #172