private function createIndexQuery(array $criteria)
    {
        $query = new IndexQuery();

        foreach($criteria as $key => $value)
        {
            $query->addAndTerm($key, $value);
        }

        return $query->getQuery();
    }