Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions redisearch/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,19 @@ func (i *Client) Drop() error {

}

// Deletes the index
func (i *Client) DropIndex(indexName string, deleteDocument bool) error {
conn := i.pool.Get()
defer conn.Close()
var err error = nil
if deleteDocument {
_, err = conn.Do("FT.DROPINDEX", indexName, "DD")
} else {
_, err = conn.Do("FT.DROPINDEX", indexName)
}
return err
}

// Delete the document from the index, optionally delete the actual document
// WARNING: As of RediSearch 2.0 and above, FT.DEL always deletes the underlying document.
// Deprecated: This function is deprecated on RediSearch 2.0 and above, use DeleteDocument() instead
Expand Down