protected function configureResolver(OptionsResolver $resolver)
    {
        $resolver
            ->setRequired(['_id', '_type', '_source'])
            ->setDefaults(['_score' => null, 'fields' => []])
            ->addAllowedTypes('_id', ['integer', 'string'])
            ->addAllowedTypes('_type', 'string')
            ->addAllowedTypes('_source', 'array')
            ->addAllowedTypes('fields', 'array');
    }
protected function configureResolver(OptionsResolver $resolver)
    {
        $resolver
            ->setRequired(['_id', '_type', '_source'])
            ->setDefaults(['_score' => null, 'fields' => []])
            ->addAllowedTypes('_id', ['integer', 'string'])
            ->addAllowedTypes('_type', 'string')
            ->addAllowedTypes('_source', 'array')
            ->addAllowedTypes('fields', 'array');
    }
protected function configureResolver ( OptionsResolver $ resolver ) { $ resolver -> setRequired ( [ '_id' , '_type' , '_source' ] ) -> setDefaults ( [ '_score' => null , 'fields' => [ ] ] ) -> addAllowedTypes ( '_id' , [ 'integer' , 'string' ] ) -> addAllowedTypes ( '_type' , 'string' ) -> addAllowedTypes ( '_source' , 'array' ) -> addAllowedTypes ( 'fields' , 'array' ) ; }
Configures OptionResolver for resolving document metadata fields.

@param OptionsResolver $resolver
Configures OptionResolver for resolving document metadata fields .