Updated optimize query to accept multiple indexes. Added to docs.