Author: Aurelien FOUCRET (aurelien.foucret@smile.fr)
Inheritance: extends AbstractConfiguration
コード例 #1
0
 /**
  * Returns index settings.
  *
  * @param string[] $synonyms   Raw synonyms list.
  * @param string[] $expansions Raw expansions list.
  *
  * @return array
  */
 private function getIndexSettings($synonyms, $expansions)
 {
     $settings = ['number_of_shards' => $this->indexSettingsHelper->getNumberOfShards(), 'number_of_replicas' => $this->indexSettingsHelper->getNumberOfReplicas(), 'requests.cache.enable' => true];
     $settings['analysis']['filter']['shingle'] = ['type' => 'shingle', 'output_false' => true, 'token_separator' => ThesaurusIndex::WORD_DELIMITER];
     $settings = $this->addAnalyzerSettings($settings, 'synonym', $synonyms);
     $settings = $this->addAnalyzerSettings($settings, 'expansion', $expansions);
     return $settings;
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function getBatchIndexingSize()
 {
     return $this->helper->getBatchIndexingSize();
 }
コード例 #3
0
ファイル: Cache.php プロジェクト: smile-sa/elasticsuite
 /**
  * Get cache tag by index identifier / store.
  *
  * @param string $indexIdentifier Index identifier.
  * @param string $storeId         Store id.
  *
  * @return string[]
  */
 private function getCacheTags($indexIdentifier, $storeId)
 {
     return [$this->indexSettingsHelper->getIndexAliasFromIdentifier($indexIdentifier, $storeId)];
 }
コード例 #4
0
ファイル: Index.php プロジェクト: smile-sa/elasticsuite
 /**
  * Returns the index alias used by store id.
  *
  * @param integer $storeId Store id.
  *
  * @return string
  */
 private function getIndexAlias($storeId)
 {
     return $this->indexSettingsHelper->getIndexAliasFromIdentifier(self::INDEX_IDENTIER, $storeId);
 }