lucene-index-opening.xml 895 B

123456789101112131415161718192021222324252627
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="learning.lucene.index-opening">
  4. <title>Index Opening and Creation</title>
  5. <para>
  6. All index operations (e.g., creating a new index, adding a document to the index, deleting a
  7. document, searching through the index) need an index object. One can be obtained using one
  8. of the following two methods.
  9. </para>
  10. <example id="learning.lucene.index-opening.creation">
  11. <title>Lucene Index Creation</title>
  12. <programlisting language="php"><![CDATA[
  13. $index = Zend_Search_Lucene::create($indexPath);
  14. ]]></programlisting>
  15. </example>
  16. <example id="learning.lucene.index-opening.opening">
  17. <title>Lucene Index Opening</title>
  18. <programlisting language="php"><![CDATA[
  19. $index = Zend_Search_Lucene::open($indexPath);
  20. ]]></programlisting>
  21. </example>
  22. </sect1>