original_string: public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null)
      {
          $subResults = array();
          $segmentStartDocId = 0;
  
          foreach ($this->_segmentInfos as $segmentInfo) {
              $subResults[] = $segmentInfo->termDocs($term, $segmentStartDocId, $docsFilter);
  
              $segmentStartDocId += $segmentInfo->count();
          }
  
          if (count($subResults) == 0) {
              return array();
          } else if (count($subResults) == 1) {
              // Index is optimized (only one segment)
              // Do not perform array reindexing
              return reset($subResults);
          } else {
              $result = call_user_func_array('array_merge', $subResults);
          }
  
          return $result;
      }
code: public function termDocs(Zend_Search_Lucene_Index_Term $term, $docsFilter = null)
      {
          $subResults = array();
          $segmentStartDocId = 0;
  
          foreach ($this->_segmentInfos as $segmentInfo) {
              $subResults[] = $segmentInfo->termDocs($term, $segmentStartDocId, $docsFilter);
  
              $segmentStartDocId += $segmentInfo->count();
          }
  
          if (count($subResults) == 0) {
              return array();
          } else if (count($subResults) == 1) {
              // Index is optimized (only one segment)
              // Do not perform array reindexing
              return reset($subResults);
          } else {
              $result = call_user_func_array('array_merge', $subResults);
          }
  
          return $result;
      }
code_tokens: public function termDocs ( Zend_Search_Lucene_Index_Term $ term , $ docsFilter = null ) { $ subResults = array ( ) ; $ segmentStartDocId = 0 ; foreach ( $ this -> _segmentInfos as $ segmentInfo ) { $ subResults [ ] = $ segmentInfo -> termDocs ( $ term , $ segmentStartDocId , $ docsFilter ) ; $ segmentStartDocId += $ segmentInfo -> count ( ) ; } if ( count ( $ subResults ) == 0 ) { return array ( ) ; } else if ( count ( $ subResults ) == 1 ) { // Index is optimized (only one segment) // Do not perform array reindexing return reset ( $ subResults ) ; } else { $ result = call_user_func_array ( 'array_merge' , $ subResults ) ; } return $ result ; }
docstring: Returns IDs of all documents containing term.
  
  @param  Zend_Search_Lucene_Index_Term            $term
  @param  Zend_Search_Lucene_Index_DocsFilter|null $docsFilter
  @return array
docstring_tokens: Returns IDs of all documents containing term .