Best Practices to rebuild index

Some best practices before sending an index rebuild request

  1. When sending a new index rebuild request, it is always a good idea to check if the previous request has finished processing.

    To check this, send a GET request to the URL https://dev.hawksearch.net/api/v10/index/status with the additional header parameter X-HawkSearch-ApiKey: YOUR_API_KEY

    curl --location --request GET 'https://dev.hawksearch.net/api/v10/index/status' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-HawkSearch-ApiKey: YOUR_API_KEY'


    The status can be considered incomplete if it is one of these cases - New, Pending, Processing, Queueso please wait before sending another index rebuild request. If a new index rebuild request is sent while the current task isn’t complete, the new request is marked “duplicate” without being processed.

    The status can be considered as done if it is one of these cases - Success, Error, Duplicated, Suspendedin which case the new/updated index will be usable and further requests to rebuild are accepted.

    { "Status": "queue", "Count": 0, "Duration": "00:00:00", "StartDateTime": "03-25-2021", "EndDateTime": null, "TimeZone": "Central Standard Time" }
  2. The status of a specific NotificationId can also be by appending the value of the NotificationId to the above request https://dev.hawksearch.net/api/v10/index/status/{{NotificationId}}