original_string: public function find($term, $fields = [])
      {
          Wildcard::setMinPrefixLength($this->minPrefixLength);
          Lucene::setResultSetLimit($this->resultsLimit);
  
          if (empty($fields)) {
              return [
                  'results' => $this->luceneIndex->find($term),
                  'query' => $term
              ];
          }
  
          $fieldTerms[] = new IndexTerm($term);
          foreach ($fields as $field => $fieldText) {
              $fieldTerms[] = new IndexTerm($fieldText, $field);
          }
          return [
              'results' => $this->luceneIndex->find(new MultiTerm($fieldTerms)),
              'query' => $term
          ];
      }
code: public function find($term, $fields = [])
      {
          Wildcard::setMinPrefixLength($this->minPrefixLength);
          Lucene::setResultSetLimit($this->resultsLimit);
  
          if (empty($fields)) {
              return [
                  'results' => $this->luceneIndex->find($term),
                  'query' => $term
              ];
          }
  
          $fieldTerms[] = new IndexTerm($term);
          foreach ($fields as $field => $fieldText) {
              $fieldTerms[] = new IndexTerm($fieldText, $field);
          }
          return [
              'results' => $this->luceneIndex->find(new MultiTerm($fieldTerms)),
              'query' => $term
          ];
      }
code_tokens: public function find ( $ term , $ fields = [ ] ) { Wildcard :: setMinPrefixLength ( $ this -> minPrefixLength ) ; Lucene :: setResultSetLimit ( $ this -> resultsLimit ) ; if ( empty ( $ fields ) ) { return [ 'results' => $ this -> luceneIndex -> find ( $ term ) , 'query' => $ term ] ; } $ fieldTerms [ ] = new IndexTerm ( $ term ) ; foreach ( $ fields as $ field => $ fieldText ) { $ fieldTerms [ ] = new IndexTerm ( $ fieldText , $ field ) ; } return [ 'results' => $ this -> luceneIndex -> find ( new MultiTerm ( $ fieldTerms ) ) , 'query' => $ term ] ; }
docstring: Search page for the term in the index.
  @param string $term
  @param array $fields (string => string)
  @return array ('results' => \ZendSearch\Lucene\Search\QueryHit[], 'query' => string)
docstring_tokens: Search page for the term in the index .