feat: add personalized search (experimental) - #971
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughIntroduces a ChangesPersonalized Search Support
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This is a localized search API addition with request serialization coverage; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Caller
participant SearchRequest
participant Personalize
Caller->>SearchRequest: Build request with personalize
SearchRequest->>Personalize: toJSONObject()
Personalize-->>SearchRequest: JSON object with userContext
SearchRequest-->>Caller: Serialized request JSON
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
SearchRequest gained showPerformanceDetails on main while this branch added personalize; both fields belong and both are serialized in toJSONObject.
Adds support for the
personalizesearch parameter introduced in Meilisearch 1.47.0. Closes #970.Personalizemodel (model/Personalize.java) with auserContextfield, mirroring the existingHybridmodel (lombok builder +toJSONObject()).SearchRequestandIndexSearchRequestnow accept an optionalpersonalizeobject and serialize it into the request body.IndexSearchRequestcovers federated / multi-search, which 1.47.0 also supports per the issue note.SearchRequestTestandIndexSearchRequestTestcovering the serialization and getters.Usage:
Note: the SDK performs search over POST (
Search/Index.search), so there is no separate GET search path in the client to update —personalizeis added to the POST request body.Summary by CodeRabbit
New Features
personalizesearch parameter.Tests