title: Zend Lucene: Fatal Error, Maximum Execution Time
body: <p>I've written a basic indexing script for my site and it seems to be working...somewhat. It gets through about 3/4 of the pages it needs to index and then give this error: </p>
  
  <blockquote>
    <p>Fatal error: Maximum execution time of 0 seconds exceeded in
    /Zend/Search/Lucene/Analysis/Analyzer.php on line 166</p>
  </blockquote>
  
  <p>It seems to hang up in a different spot each time, too. I ran it a minute later and got this:</p>
  
  <blockquote>
    <p>Fatal error: Maximum execution time of 0 seconds exceeded in
    /Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 349</p>
  </blockquote>
  
  <p>Here's the script:</p>
  
  <pre><code>foreach($all_items as $item) {
      $doc = new Zend_Search_Lucene_Document();
  
      $doc-&gt;addField(Zend_Search_Lucene_Field::Text('title', $item['pagetitle']));
  
      $doc-&gt;addField(Zend_Search_Lucene_Field::Text('url', $item['url']));
  
      $doc-&gt;addField(Zend_Search_Lucene_Field::Text('country', $item['country']));
  
      // Add document to the index
      $index-&gt;addDocument($doc);
  }
  </code></pre>