Question: i Want to Override

> 
> Magento\Wishlist\CustomerData\Wishlist
> 
> 
> 

```
public function getSectionData()
    {
        $counter = $this->getCounter();
        return [
            'counter' => $counter,
            'items' => $counter ? $this->getItems() : [],
        ];
    }

```

so in My `etc\frontend\di.xml`

```
<type name="Magento\Wishlist\CustomerData\Wishlist">
     <plugin name="wishlist" type="Vendor\ModuleName\Plugin\Wishlist" disabled="false" sortOrder="0"/>
</type>

```

in My 

> 
> Vendor\ModuleName\Plugin\Wishlist
> 
> 
> 

```
class Wishlist
{

    public function afterGetSectionData(\Magento\Wishlist\CustomerData\Wishlist $subject, $result)
    {
        return [
            'counter' => 2,
            'items' => NULL,
        ];

    }
}

```

when i apply plugin i am not getting any wishlist Array in `mage-cache-storage`

Answer: 
Go to `Magento\Elasticsearch6\Model\Client\Elasticsearch`

Find function `addFieldsMapping` approx line number 241

Add new element to `$params` array

```
'include_type_name' => true,

```

This will resolve your error

```
$params = [
    'index' => $index,
    'type' => $entityType,
    'include_type_name' => true,

```
This has fixed the problem `Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true.` for me in Magento 2.4.2-p1:

```
n98-magerun2.phar  config:store:set  catalog/search/engine  elasticsearch7
n98-magerun2.phar  config:store:set  catalog/search/elasticsearch7_server_hostname  '<elastic_host>'
n98-magerun2.phar  cache:clean  config

```

If you don't have `n98-magerun2.phar` installed, [more info can be found here](https://github.com/netz98/n98-magerun2#download-and-install-phar-file). You can also [switch to ElasticSearch 7 using the Admin interface](https://www.mageplaza.com/kb/how-to-configure-elasticseach-in-magento-2.html#step-1).