Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending undefined in initIndex() function is creates and index with "undefined" name #1428

Open
anshulsahni opened this issue Oct 1, 2022 · 1 comment

Comments

@anshulsahni
Copy link

While initialising the index - means calling initIndex() if no argument is sent then it considers index name as "undefined" and sends the request to algolia platform with index name value defined as undefined. Of course, the index of that name wouldn't exist in most of the systems, hence it creates a new index with the name undefined.

This is leading to two problems

  1. if the variable containing the index name is not having a value due to some bug, it's not possible to detect because initIndex() function is not throwing an error
  2. Unnecessarily, an index is created in the Algolia dashboard with an unwanted name, making it again very hard to detect or debug an issue

IMO initIndex() behaviour should be to raise an exception in case the value of the index name passed as an argument is undefined, null or an empty string

@egorkel-altexsoft
Copy link

We faced the same issue. We had a bug in our system that we lost the name of the index and sent data to the undefined index. It definitely should throw an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants