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

Changes due to the implicit index creation #124

Merged
merged 3 commits into from
Dec 31, 2020
Merged

Changes due to the implicit index creation #124

merged 3 commits into from
Dec 31, 2020

Conversation

curquiza
Copy link
Member

@curquiza curquiza commented Dec 30, 2020

Related to meilisearch/integration-guides#48

Changes:

  • New method $client->index($uid): replaces $client->getIndex($uid). Does not do any HTTP call but only returns an Index instance.
  • New attribute in the Index class: primaryKey
  • New method $index->fetchRawInfo(): returns an array of index
  • New method $index->fetchInfo(): returns an Index instance

Breaking changes:

  • $client->getIndex($uid) now does an HTTP call. Use $client->index($uid) instead.
  • $client->updateIndex returns an Index instance.
  • $index->getPrimaryKey() does not do any HTTP call, but only return the primaryKey attribute. Use $index->fetchPrimaryKey() if you want the same behavior as the old $index->getPrimaryKey()
  • $index->show() is removed and replaced by $index->fetchInfo() (returns an instance) and $index->fetchRawInfo() (returns an array)
  • $client->showIndex($uid) is removed. Use $client->getIndex($uid) (returns an instance) or $client->index($uid)->fetchRawInfo() (returns an array) instead.

@curquiza curquiza added the breaking-change The related changes are breaking for the users label Dec 30, 2020
@curquiza curquiza changed the title Lazy index Changes due to the implicit index creation Dec 30, 2020
@curquiza curquiza requested a review from eskombro December 30, 2020 17:49
eskombro
eskombro previously approved these changes Dec 31, 2020
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great implementation @curquiza ! TY

🎉

.code-samples.meilisearch.yaml Outdated Show resolved Hide resolved
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌🏽

@curquiza
Copy link
Member Author

Bors merge

@bors
Copy link
Contributor

bors bot commented Dec 31, 2020

@bors bors bot merged commit d172d06 into master Dec 31, 2020
@bors bors bot deleted the lazy-index branch December 31, 2020 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change The related changes are breaking for the users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants