getAnalysisSettings() public method

Load analysis settings by store.
public getAnalysisSettings ( integer | string | Magento\Store\Api\Data\StoreInterface $store ) : array
$store integer | string | Magento\Store\Api\Data\StoreInterface Store.
return array
Example #1
0
 /**
  * {@inheritDoc}
  */
 public function createIndex($indexIdentifier, $store)
 {
     $index = $this->initIndex($indexIdentifier, $store, false);
     $indexSettings = ['settings' => $this->indexSettings->getCreateIndexSettings()];
     $indexSettings['settings']['analysis'] = $this->indexSettings->getAnalysisSettings($store);
     foreach ($index->getTypes() as $currentType) {
         $indexSettings['mappings'][$currentType->getName()] = $currentType->getMapping()->asArray();
     }
     $this->client->indices()->create(['index' => $index->getName(), 'body' => $indexSettings]);
     return $index;
 }