private function createIndexQueryPath(Bucket $bucket)
{
/** @var Command\Indexes\Query $command */
$command = $this->command;
if ($command->isMatchQuery()) {
$path = sprintf('/types/%s/buckets/%s/index/%s/%s', $bucket->getType(), $bucket->getName(), $command->getIndexName(), $command->getMatchValue());
} elseif ($command->isRangeQuery()) {
$path = sprintf('/types/%s/buckets/%s/index/%s/%s/%s', $bucket->getType(), $bucket->getName(), $command->getIndexName(), $command->getLowerBound(), $command->getUpperBound());
} else {
throw new Api\Exception("Invalid Secondary Index Query.");
}
return $path;
}