/**
  * @return SearchFactory
  */
 protected function getFactory()
 {
     if (null === $this->searchFactory) {
         $this->factoryBuilder->addExtensions($this->getExtensions());
         $this->factoryBuilder->addTypes($this->getTypes());
         $this->factoryBuilder->addTypeExtensions($this->getTypeExtensions());
         $this->searchFactory = $this->factoryBuilder->getSearchFactory();
     }
     return $this->searchFactory;
 }
Пример #2
0
 /**
  * Creates a search factory builder with the default configuration.
  *
  * @return SearchFactoryBuilder The search factory builder
  */
 public static function createSearchFactoryBuilder()
 {
     $builder = new SearchFactoryBuilder();
     $builder->addExtension(new CoreExtension());
     return $builder;
 }