public function setAnalysis(Index $index, AnalysisFactoryInterface $analysis)
    {
        $index->create(
            array(
                'number_of_shards' => $this->numberOfShards,
                'number_of_replicas' => $this->numberOfReplicas,
                'analysis' => $analysis->build(),
            )
        );
    }