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