|
|
@@ -72,6 +72,20 @@ $index->find($query);
|
|
|
]]></programlisting>
|
|
|
|
|
|
<para>
|
|
|
+ You can also search multiple indexes simultaneously using MultiSearcher, which operates
|
|
|
+ using the same <acronym>API</acronym> as searching on a single index:
|
|
|
+ </para>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
+$multi = new Zend_Search_Lucene_MultiSearcher();
|
|
|
+$multi->addIndex(Zend_Search_Lucene::open('/data/my_index_one');
|
|
|
+$multi->addIndex(Zend_Search_Lucene::open('/data/my_index_two');
|
|
|
+
|
|
|
+$multi->find($query);
|
|
|
+]]></programlisting>
|
|
|
+
|
|
|
+
|
|
|
+ <para>
|
|
|
The <methodname>Zend_Search_Lucene::find()</methodname> method determines the input type
|
|
|
automatically and uses the query parser to construct an appropriate
|
|
|
<classname>Zend_Search_Lucene_Search_Query</classname> object from an input of type
|