from upstash_search import Search

client = Search(
    url="<UPSTASH_SEARCH_REST_URL>",
    token="<UPSTASH_SEARCH_REST_TOKEN>",
)

index = client.index("movies")
index.reset()

Reset Command for Python SDK

The reset method allows you to clear all documents from a particular index.

Response

Response
string
required

'Success' if the database is successfully reset.

from upstash_search import Search

client = Search(
    url="<UPSTASH_SEARCH_REST_URL>",
    token="<UPSTASH_SEARCH_REST_TOKEN>",
)

index = client.index("movies")
index.reset()