RediSearch / redisearch-py

RediSearch python client

Home Page:https://redisearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client.drop_index uses the deprecated FT.DROP command, destroying all indexed Hashes

abrookins opened this issue · comments

FT.DROP is deprecated and by default deletes the indexed Hashes. Calling Client.drop_index thus deletes the indexed hashes.

This library should use FT.DROPINDEX for its drop command and expose the DD option to control whether or not to delete Hashes, with 'False' being the default. This way, dropping an index will not destroy the Hashes by default.

@emmanuelkeller What do you think about this? I'm worried that someone will try to drop a 2.0 index and accidentally destroy data.

@abrookins You are absolutely right. This is currently done in this PR. Waiting for merge

#108

Fixed by #108.