Skip to content

Feature/get documents by ids #630

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MohamedBng
Copy link

What does this PR do?

Adds support for retrieving documents by ID using the documents(ids: [...]) option.

Changes

  • Modified the documents method in Meilisearch::Index to support the ids: parameter
  • Calls the /documents/fetch endpoint when ids: is present
  • Keeps backwards compatibility with existing filtering and pagination options

How to test this?

  1. Add documents to an index
  2. Call documents(ids: [...]) and verify that only the specified documents are returned
  3. Run the full test suite with bundle exec rspec

Related issue

Closes #628

@MohamedBng MohamedBng force-pushed the feature/get-documents-by-ids branch from a37ada5 to 39e233b Compare April 24, 2025 18:45
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

Successfully merging this pull request may close these issues.

[v1.14] Get documents by ID
1 participant