title: How to get first 20 documents in Zend lucene search when no search term is provided?
body: <p>I have a fairly new grasp of <code>Zend_Search_Lucene</code>, and how to build and search through documents added to indicies, but I want to know if it is possible to return documents if no search term is provided at all.</p>
  
  <p>I know that sounds strange, and probably goes against the purpose of the lucene search, but I've run into a scenario where returning the first 20 documents to the user is preferred, rather than nothing, if they just click on 'Search' without typing in any search term.</p>
  
  <p>So therein lies my question: what search term could I provide <code>Zend_Search_Lucene</code> that would return the first 20 documents it encounters when no search term is provided to rather see <em>some</em> results vs. seeing nothing at all.</p>
  
  <p>I've already got this working great:</p>
  
  <pre><code>&lt;?php
  
      Zend_Search_Lucene::setResultSetLimit(20);
  
      $index = Zend_Search_Lucene::open("some/path/to/index");
  
      $search_term = trim($_POST["search_term"]);
  
      if ($search_term == "")
      {
          // adjust the search term to return any documents...
          // will obviously be limited to the first 20...
      }
  
      $hits = $index-&gt;find($search_term);
  
      // display the results...
      // ...
  
  ?&gt;
  </code></pre>
  
  <p>Thank you so much for your time, and any help / suggestions!</p>