original_string: public function createIndex(): bool
      {
          $class = $this->class;
  
          $indexParams = [
              'index' => $this->index,
          ];
  
          if (count($this->notAnalyzedFields)) {
              $indexParams['body'] = [
                  'mappings' => [
                      $class => [
                          '_source'    => [
                              'enabled' => true
                          ],
                          'properties' => $this->createNotAnalyzedFieldsMapping($this->notAnalyzedFields),
                      ]
                  ]
              ];
          }
  
          $this->client->indices()->create($indexParams);
          $response = $this->client->cluster()->health([
              'index'           => $this->index,
              'wait_for_status' => 'yellow',
              'timeout'         => '5s',
          ]);
  
          return isset($response['status']) && $response['status'] !== 'red';
      }
code: public function createIndex(): bool
      {
          $class = $this->class;
  
          $indexParams = [
              'index' => $this->index,
          ];
  
          if (count($this->notAnalyzedFields)) {
              $indexParams['body'] = [
                  'mappings' => [
                      $class => [
                          '_source'    => [
                              'enabled' => true
                          ],
                          'properties' => $this->createNotAnalyzedFieldsMapping($this->notAnalyzedFields),
                      ]
                  ]
              ];
          }
  
          $this->client->indices()->create($indexParams);
          $response = $this->client->cluster()->health([
              'index'           => $this->index,
              'wait_for_status' => 'yellow',
              'timeout'         => '5s',
          ]);
  
          return isset($response['status']) && $response['status'] !== 'red';
      }
code_tokens: public function createIndex ( ) : bool { $ class = $ this -> class ; $ indexParams = [ 'index' => $ this -> index , ] ; if ( count ( $ this -> notAnalyzedFields ) ) { $ indexParams [ 'body' ] = [ 'mappings' => [ $ class => [ '_source' => [ 'enabled' => true ] , 'properties' => $ this -> createNotAnalyzedFieldsMapping ( $ this -> notAnalyzedFields ) , ] ] ] ; } $ this -> client -> indices ( ) -> create ( $ indexParams ) ; $ response = $ this -> client -> cluster ( ) -> health ( [ 'index' => $ this -> index , 'wait_for_status' => 'yellow' , 'timeout' => '5s' , ] ) ; return isset ( $ response [ 'status' ] ) && $ response [ 'status' ] !== 'red' ; }
docstring: Creates the index for this repository's ReadModel.
  
  @return boolean True, if the index was successfully created
docstring_tokens: Creates the index for this repository s ReadModel .