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

Method to get all the indexes should return a list of instance #201

Closed
3 tasks
curquiza opened this issue Oct 6, 2021 · 5 comments · Fixed by #208
Closed
3 tasks

Method to get all the indexes should return a list of instance #201

curquiza opened this issue Oct 6, 2021 · 5 comments · Fixed by #208
Labels
good first issue Good for newcomers

Comments

@curquiza
Copy link
Member

curquiza commented Oct 6, 2021

Currently, the get_all_indexes method returns a raw list of object, but not a list of Index instance. This is the only index-related method that does not return an Index instance.

An instance is more convenient to manipulate than a raw object. See this example.

TODO

  • Change the return of the current get_all_indexes: make it return a list of Index instances
  • Provide get_all_raw_indexes: a method that returns the list of object of indexes, so the response of the MeiliSearch server.
  • Add tests

⚠️ No code duplication: use get_all_raw_indexes in get_all_indexes.

Related to meilisearch/integration-guides#122

⚠️ Also, this issue is generated, and get_all_indexes might be named differently in this package. Keep the already existing way of naming in this package to stay idomatic with the language and the repository.

Sorry if this is already partially/completely implemented, feel free to let me know about the state of this issue.

@kashifsoofi
Copy link
Contributor

Can I please work on this?

@curquiza
Copy link
Member Author

curquiza commented Oct 6, 2021

Please go @kashifsoofi :)

@kashifsoofi
Copy link
Contributor

It already returns a list of Index instances

@alallema
Copy link
Contributor

alallema commented Oct 7, 2021

Yes you right, but you can still implemented the get_all_raw_indexes if you want

@kashifsoofi
Copy link
Contributor

Actually I am not sure about the output for get_all_raw_indexes

rizalgowandy pushed a commit to rizalgowandy/meilisearch-go that referenced this issue Oct 9, 2021
@alallema alallema linked a pull request Oct 11, 2021 that will close this issue
bors bot added a commit that referenced this issue Oct 11, 2021
208: Add new client method for `getAllRawIndexes()` r=alallema a=rizalgowandy

Issue: #201
Extra: run `gofmt` for the whole project

Co-authored-by: Rizal Widyarta Gowandy <rizal.gowandy@tokopedia.com>
@bors bors bot closed this as completed in #208 Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants