Skip to main content

Clearing All Data from Your Index

There may come a time when you need to start fresh and remove all data from your HoppySearch index. This could be for reasons such as reindexing your data or clearing outdated information. HoppySearch provides a straightforward feature to clear or delete all data from your index effortlessly.

Follow the instructions below to clear all data from your HoppySearch index.

How to Clear All Data

  1. Initial Configuration:
    1. Before you can clear all data from your index, ensure you have configured your HoppySearch client as detailed in the initial setup documentation.
  2. Clear All Data:
    1. To clear all data from your HoppySearch index, use the following code:
    hoppysearch.clearIndex()
    .then(res => {
    console.log('statusCode:', res.status);
    console.log('response text:', res.body);
    })
    .catch(err => {
    console.log(err)
    });

This code will send a request to HoppySearch to clear or delete all data from your index.


By following these steps, you can easily clear or delete all data from your HoppySearch index. This feature provides you with a clean slate, allowing you to start fresh with your index as needed.