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);
        }
    }
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);
        }
    }
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 ) ; } }
Delete document from the index.
@param string $text
@param string|null $field
Delete document from the index .