Skip to content

Commit

Permalink
9.1.2 (#283)
Browse files Browse the repository at this point in the history
* fix: redisearch ft.aggregate sortby num args
  • Loading branch information
aembke authored Aug 23, 2024
1 parent 3ea0ce2 commit b2f51e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 9.1.2

* Fix `FT.AGGREGATE` command with `SORTBY` operation

## 9.1.1

* Fix tracing span names and missing fields
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "fred"
readme = "README.md"
repository = "https://github.com/aembke/fred.rs"
rust-version = "1.75"
version = "9.1.1"
version = "9.1.2"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion src/commands/impls/redisearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ fn gen_aggregate_op(args: &mut Vec<RedisValue>, operation: AggregateOperation) -
args.extend([static_val!(APPLY), expression.into(), static_val!(AS), name.into()]);
},
AggregateOperation::SortBy { properties, max } => {
args.extend([static_val!(SORTBY), properties.len().try_into()?]);
args.extend([static_val!(SORTBY), (properties.len() * 2).try_into()?]);
for (property, order) in properties.into_iter() {
args.extend([property.into(), order.to_str().into()]);
}
Expand Down
9 changes: 4 additions & 5 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,10 @@ pub async fn interrupt_blocked_connection(
id
};

let mut args = Vec::with_capacity(2);
args.push(connection_id.into());
args.push(flag.to_str().into());
let command = RedisCommand::new(RedisCommandKind::ClientUnblock, args);

let command = RedisCommand::new(RedisCommandKind::ClientUnblock, vec![
connection_id.into(),
flag.to_str().into(),
]);
let frame = backchannel_request_response(inner, command, true).await?;
protocol_utils::frame_to_results(frame).map(|_| ())
}
Expand Down

0 comments on commit b2f51e8

Please sign in to comment.