zend-framework2zend-search-lucene

ZendSearch in Zend Framework 2


I'm trying to get ZendSearch working in Zend Framework 2. I required it using composer

"require" : {
  "php" : ">=5.3.3",
  "zendframework/zendframework" : "2.2.*",
  "zf-commons/zfc-twig" : "dev-master",
  "zendframework/zendsearch" : "dev-master"
},

which works great. The next step would be to include the Module in my application.config.php file. But I am really stuck here as I don't know what to include. I tried "ZendSearch", "zendsearch", "Zend_Search" etc. as module name but the module never gets loaded. I get a php error while trying to load the module

...    
Zend\ModuleManager\ModuleManager->loadModule('ZendSearch')
...

Am I doing anything wrong?


Solution

  • ZendSearch is not a ZF2 module, it is a component. Having installed it through Composer, you don't need to do anything else; you should now be able to use the ZendSearch classes in your application.