Skip to content

feat: Add recency boost support to SearchRequest#183

Open
raphaeldelio wants to merge 1 commit intoredis:mainfrom
raphaeldelio:feat/java-sdk-recency-boost
Open

feat: Add recency boost support to SearchRequest#183
raphaeldelio wants to merge 1 commit intoredis:mainfrom
raphaeldelio:feat/java-sdk-recency-boost

Conversation

@raphaeldelio
Copy link
Collaborator

@raphaeldelio raphaeldelio commented Mar 5, 2026

Summary

Adds recency boost support to the Java SDK's SearchRequest, enabling control over memory decay in search results.

Changes

  • SearchRequest: Added 8 recency boost fields with builder support
  • LongTermMemoryService: Include recency params in search payload
  • Added 4 unit tests for recency boost functionality

Usage

SearchRequest request = SearchRequest.builder()
    .text("query")
    .recencyBoost(true)
    .recencySemanticWeight(0.7)
    .recencyRecencyWeight(0.3)
    .serverSideRecency(true)
    .build();

Note

Low Risk
Low risk: changes are additive optional fields and request-payload wiring for search, plus tests. Main impact is that search requests may now include new/previously-ignored parameters (recency_*, server_side_recency, distance_threshold) when set, which can change search results.

Overview
Adds recency-boost tuning controls to SearchRequest (new recency_* weights/half-lives plus server_side_recency) with getters/setters, builder methods, and toString updates.

Updates LongTermMemoryService.searchLongTermMemories to include distance_threshold and any provided recency parameters in the JSON payload, and adds unit + integration tests asserting these fields are serialized and accepted in search calls.

Written by Cursor Bugbot for commit 8726e62. This will update automatically on new commits. Configure here.

@raphaeldelio raphaeldelio requested review from bsbodden and jruaux March 5, 2026 15:27
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.

1 participant