Пример #1
0
 public function getMapping()
 {
     $mapping = new Mapping();
     $mapping->add('raw_value', 'string')->notAnalyzed()->add('value', 'string')->analyzer('general_light')->addMultiField('strict', 'thesaurus_term_strict')->addLocalizedSubfields($this->locales)->add('context', 'string')->analyzer('general_light')->addMultiField('strict', 'thesaurus_term_strict')->addLocalizedSubfields($this->locales)->add('path', 'string')->analyzer('thesaurus_path', 'indexing')->analyzer('keyword', 'searching')->addRawVersion()->add('lang', 'string')->notAnalyzed()->add('databox_id', 'integer');
     return $mapping->export();
 }
Пример #2
0
 private function getFlagsMapping()
 {
     $mapping = new Mapping();
     foreach ($this->structure->getAllFlags() as $name => $_) {
         $mapping->add($name, 'boolean');
     }
     return $mapping;
 }