You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds support for the skipCreation parameter introduced in Meilisearch v1.31.0
Allows users to skip document creation when using addDocuments and updateDocuments methods, while still allowing updates to existing documents
Updates code examples to demonstrate the new parameter usage
The code in this pull request was generated by GitHub Copilot with the Claude Sonnet 4.5 model.
PR checklist
Please check if your PR fulfills the following requirements:
Did you use any AI tool while implementing this PR (code, tests, docs, etc.)? If yes, disclose it in the PR description and describe what it was used for. AI usage is allowed when it is disclosed.
Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
Have you read the contributing guidelines?
Have you made sure that the title is accurate and descriptive of the changes?
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Added skipCreation parameter option to control whether document operations create new documents or only update existing ones.
Tests
Added integration tests for skipCreation behavior across add and update operations.
✏️ Tip: You can customize this high-level summary in your review settings.
This PR adds support for the skipCreation parameter to the Meilisearch Java SDK's document operations. New 6-parameter method overloads are introduced in Documents and Index classes to accept a skipCreation Boolean flag, which is passed through to API calls. Integration tests and code samples are updated accordingly.
Changes
Cohort / File(s)
Summary
Core API Extensions src/main/java/com/meilisearch/sdk/Documents.java, src/main/java/com/meilisearch/sdk/Index.java
Added 6-parameter overloads for addDocuments and updateDocuments methods accepting skipCreation Boolean parameter; existing 4-parameter overloads now delegate to new overloads with null skipCreation value; URL construction extended to include skipCreation parameter when provided.
Added four new tests: testAddDocumentsWithSkipCreationTrue/False and testUpdateDocumentsWithSkipCreationTrue/False to verify creation behavior with skipCreation flag enabled and disabled.
Code Examples .code-samples.meilisearch.yaml
Updated add_or_replace_documents_1 and add_or_update_documents_1 sample code with trailing skipCreation parameter (false) and updated document title to "Shazam ⚡️".
🐰 A hoppy hop, parameters take flight,
SkipCreation bounds through the code so bright,
Documents dance with new overloads,
Tests verify the creation roads,
Meilisearch hops to v1.31, what a delight! ✨
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title clearly and concisely summarizes the main change: adding support for the skipCreation parameter in document operations.
Linked Issues check
✅ Passed
All coding requirements from issue #919 are met: skipCreation parameter support added to addDocuments/updateDocuments in Documents and Index classes, test cases added, and code examples updated.
Out of Scope Changes check
✅ Passed
All changes directly relate to implementing skipCreation support for document operations, with no extraneous modifications beyond the linked issue scope.
Docstring Coverage
✅ Passed
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Related issue
Fixes #919.
What does this PR do?
skipCreationparameter introduced in Meilisearch v1.31.0addDocumentsandupdateDocumentsmethods, while still allowing updates to existing documentsThe code in this pull request was generated by GitHub Copilot with the Claude Sonnet 4.5 model.
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.