I am using Zend_Search_Lucene to implement site search. I created separate indices for different data types (e.g. one for users, one for posts etc). The results are similarly divided by data type however there is an ‘all’ option which should show a combination of the different result types. Is it possible to search across the different indices at once? or do i have to index everything in an all index?
Update: The readme for ZF 1.8 suggests that it’s now possible to do in ZF 1.8 but I’ve been unable to track down where this is at in the documentation.
So after some research you have to use Zend_Search_Lucene_Interface_MultiSearcher. I don’t see any mention of it in the documentation as of this writing but if you look at the actual class in ZF 1.8 it’s straightforward t use
NB it doesn’t follow PEAR syntax so won’w work with Zend_Loader::loadClass