diff --git a/algolia/search/index.go b/algolia/search/index.go index 664881cad..fb6c4ad25 100644 --- a/algolia/search/index.go +++ b/algolia/search/index.go @@ -104,8 +104,8 @@ func (i *Index) GetStatus(taskID int64, opts ...interface{}) (res TaskStatusRes, // Exists returns whether an initialized index exists or not, along with a nil // error. When encountering a network error, a non-nil error is returned along // with false. -func (i *Index) Exists() (bool, error) { - _, err := i.GetSettings() +func (i *Index) Exists(opts ...interface{}) (bool, error) { + _, err := i.GetSettings(opts) if err == nil { return true, nil } diff --git a/algolia/search/index_interface.go b/algolia/search/index_interface.go index 3b1375f23..c6978c7ab 100644 --- a/algolia/search/index_interface.go +++ b/algolia/search/index_interface.go @@ -10,7 +10,7 @@ type IndexInterface interface { GetName() string ClearObjects(opts ...interface{}) (res UpdateTaskRes, err error) Delete(opts ...interface{}) (res DeleteTaskRes, err error) - Exists() (exists bool, err error) + Exists(opts ...interface{}) (exists bool, err error) // Indexing GetObject(objectID string, object interface{}, opts ...interface{}) error