original_string: public function delete($text, $field = null)
      {
          $query = new Term(new IndexTerm($text, $field));
          $hits = $this->luceneIndex->find($query);
          foreach ($hits as $hit) {
              $this->luceneIndex->delete($hit);
          }
      }
code: public function delete($text, $field = null)
      {
          $query = new Term(new IndexTerm($text, $field));
          $hits = $this->luceneIndex->find($query);
          foreach ($hits as $hit) {
              $this->luceneIndex->delete($hit);
          }
      }
code_tokens: public function delete ( $ text , $ field = null ) { $ query = new Term ( new IndexTerm ( $ text , $ field ) ) ; $ hits = $ this -> luceneIndex -> find ( $ query ) ; foreach ( $ hits as $ hit ) { $ this -> luceneIndex -> delete ( $ hit ) ; } }
docstring: Delete document from the index.
  @param string $text
  @param string|null $field
docstring_tokens: Delete document from the index .