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');
    }