-
Notifications
You must be signed in to change notification settings - Fork 106
chore: add explicit nil to add documents primarykey in docs #706
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
Conversation
WalkthroughUpdates README Table of Contents and headings; fixes README code sample to call AddDocuments with a second argument. Updates doc.go example to pass a second argument to AddDocuments. Notes a change to the exported AddDocuments method signature to include an options parameter. Changes
Sequence Diagram(s)Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changesPoem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #706 +/- ##
=======================================
Coverage 85.80% 85.80%
=======================================
Files 22 22
Lines 3614 3614
=======================================
Hits 3101 3101
Misses 366 366
Partials 147 147 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
doc.go (1)
23-23: Clarify what the nil stands for.
A short note will prevent confusion about when to replace nil with a real value.Apply this diff to the example block:
-// task, err := idx.AddDocuments(documents, nil) +// // Pass nil to use defaults. Replace nil with the appropriate second argument for your version (e.g., primary key or options). +// task, err := idx.AddDocuments(documents, nil)README.md (3)
97-105: Add a one-line hint about the second parameter.
Readers won’t know when to keep nil vs. provide a value.Apply this diff inside the code sample:
- task, err := index.AddDocuments(documents, nil) + // Pass nil to use defaults. Replace nil with the appropriate second argument for your version (e.g., primary key or options). + task, err := index.AddDocuments(documents, nil)
37-42: Fix TOC nested list indentation (markdownlint MD007).
Use 2-space indents for sub-items.Apply this diff:
- - [Add documents](#add-documents) - - [Basic Search](#basic-search) - - [Custom Search](#custom-search) - - [Custom Search With Filters](#custom-search-with-filters) - - [Customize Client](#customize-client) - - [Make SDK Faster](#make-sdk-faster) + - [Add documents](#add-documents) + - [Basic Search](#basic-search) + - [Custom Search](#custom-search) + - [Custom Search With Filters](#custom-search-with-filters) + - [Customize Client](#customize-client) + - [Make SDK Faster](#make-sdk-faster)
33-33: Remove the self-linking TOC entry.
Redundant and a minor distraction.Apply this diff:
-- [Table of Contents](#table-of-contents)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
README.md(2 hunks)doc.go(1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[grammar] ~33-~33: There might be a mistake here.
Context: ... Table of Contents - Table of Contents - 📖 Documentation - [🔧...
(QB_NEW_EN)
[grammar] ~34-~34: There might be a mistake here.
Context: ...(#table-of-contents) - 📖 Documentation - [🔧 Installation (>= 1.20)](#-installati...
(QB_NEW_EN)
[grammar] ~35-~35: There might be a mistake here.
Context: ...mentation) - 🔧 Installation (>= 1.20) - 🚀 Getting started ...
(QB_NEW_EN)
[grammar] ~36-~36: There might be a mistake here.
Context: ...20)](#-installation--120) - 🚀 Getting started - Add documents - [Ba...
(QB_NEW_EN)
[grammar] ~37-~37: There might be a mistake here.
Context: ... started](#-getting-started) - Add documents - Basic Search - [Cust...
(QB_NEW_EN)
[grammar] ~38-~38: There might be a mistake here.
Context: ...nts](#add-documents) - Basic Search - Custom Search - [Cu...
(QB_NEW_EN)
[grammar] ~39-~39: There might be a mistake here.
Context: ...rch](#basic-search) - Custom Search - [Custom Search With Filters](#custom-sear...
(QB_NEW_EN)
[grammar] ~40-~40: There might be a mistake here.
Context: ...earch) - Custom Search With Filters - Customize Client ...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...ch-with-filters) - Customize Client - Make SDK Faster - [🤖...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...customize-client) - Make SDK Faster - [🤖 Compatibility with Meilisearch](#-com...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ...er) - 🤖 Compatibility with Meilisearch - [⚡️ Benchmark Performance](#️-benchmark-p...
(QB_NEW_EN)
[grammar] ~44-~44: There might be a mistake here.
Context: ...meilisearch) - ⚡️ Benchmark Performance - 💡 Learn more - [⚙️ Contr...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.17.2)
README.md
37-37: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
38-38: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
39-39: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
40-40: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
41-41: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
42-42: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: integration-tests (go current version)
- GitHub Check: integration-tests (go latest version)
🔇 Additional comments (4)
doc.go (1)
23-23: LGTM: example now compiles with the current signature.
The explicit nil fixes the README/guide mismatch reported in the linked issue.README.md (3)
97-105: LGTM: passing a second argument removes the compile error.
This aligns the sample with the actual method signature.
35-35: Verify anchor slugs for emoji headings.
GitHub’s slug generation around emoji and special chars can be finicky—please preview that these links resolve.If any link is broken, adjust the fragment to match the rendered slug in GitHub’s preview for:
- Installation (>= 1.20)
- ⚡️ Benchmark Performance
Also applies to: 44-44
97-105: All AddDocuments calls use the updated two-argument signature; no one-arg instances found.
Pull Request
Related issue
Fixes #697
What does this PR do?
PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Documentation