-
Notifications
You must be signed in to change notification settings - Fork 4
trashed text search #84
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
|
Warning Rate limit exceeded@GautierDele has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 21 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughDocumentation update to content/2.endpoints/2.search.md adding a “Text search with trash” subsection with JSON examples for trashed handling, clarifications about Laravel Scout Builder vs Eloquent, and a minor formatting change in the Impacts table. No code or API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
✨ 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 comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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 (2)
content/2.endpoints/2.search.md (2)
576-577: Clarify wording and capitalization for sorts.field rowTweak phrasing for correctness and consistency with “Scout”/“resource details” terminology.
-| `sorts.field` | take scout fields instead of fields in resource detail | +| `sorts.field` | uses Scout fields instead of fields defined in resource details |
579-608: Tighten heading/grammar and explicitly document accepted values and default for text.trashed
- Improve heading clarity and grammar.
- Explicitly list allowed values for text.trashed and the default behavior.
- Add a short note reminding that scopes (including withTrashed) are not supported with text search; use text.trashed instead.
Please confirm the default matches implementation (i.e., trashed records are excluded unless text.trashed is set).
-#### Text search with trash - -Because the Laravel Scout Builder is not built the same as the Eloquent one, `withTrashed` instruction is not a scope -anymore and work differently: +#### Text search with trashed models + +Because the Laravel Scout Builder differs from Eloquent, `withTrashed` is not a scope when performing text search. +Instead, control trashed handling via the `text.trashed` option: + +- "with" → include both non-trashed and trashed records +- "only" → include only trashed records +- omitted → exclude trashed records (default) + +Note: When using text search, scopes are not supported (see Impacts above). Do not send `withTrashed` in `scopes`; use `text.trashed` instead. ```json // (POST) api/posts/search { "search": { "text": { "value": "my text search", "trashed": "with" } } }-or for
onlyTrashed:
+or for only trashed records:// (POST) api/posts/search { "search": { "text": { "value": "my text search", "trashed": "only" } } }</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between b5e90977455468e5f4c8db9311516f677943c016 and d4e434869fde549e78e025106ebf9674e7e0a6c4. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `content/2.endpoints/2.search.md` (1 hunks) </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary by CodeRabbit