0

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?

lc_ik
  • 124
  • 5

1 Answers1

2

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.

Tim Fountain
  • 33,093
  • 5
  • 41
  • 69
  • You are right about that, thank you. I still can not use then ZendSearch methods in my application as the classes don't get autoloaded. If I manually require the lucene.php file everything works fine. Guess I need to take a look into the autoloading handled by composer – lc_ik May 23 '14 at 08:06