1
0
mirror of https://github.com/redis/go-redis.git synced 2025-04-16 09:23:06 +03:00

fix(test): sort results in example test (#3292)

This commit is contained in:
Nedyalko Dyakov 2025-03-04 14:28:08 +02:00 committed by GitHub
parent cd55713972
commit 8e4a2ee5c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,6 +230,12 @@ func ExampleClient_query_range() {
FieldName: "price",
},
},
SortBy: []redis.FTSearchSortBy{
{
FieldName: "price",
Asc: true,
},
},
},
).Result()
@ -263,6 +269,12 @@ func ExampleClient_query_range() {
FieldName: "price",
},
},
SortBy: []redis.FTSearchSortBy{
{
FieldName: "price",
Asc: true,
},
},
},
).Result()
@ -289,6 +301,12 @@ func ExampleClient_query_range() {
FieldName: "price",
},
},
SortBy: []redis.FTSearchSortBy{
{
FieldName: "price",
Asc: true,
},
},
Filters: []redis.FTSearchFilter{
{
FieldName: "price",
@ -354,19 +372,19 @@ func ExampleClient_query_range() {
// Output:
// 3
// bicycle:2 : price 815
// bicycle:5 : price 810
// bicycle:2 : price 815
// bicycle:9 : price 815
// 3
// bicycle:2 : price 815
// bicycle:5 : price 810
// bicycle:2 : price 815
// bicycle:9 : price 815
// 5
// bicycle:1 : price 1200
// bicycle:4 : price 3200
// bicycle:6 : price 2300
// bicycle:3 : price 3400
// bicycle:8 : price 1200
// bicycle:6 : price 2300
// bicycle:4 : price 3200
// bicycle:3 : price 3400
// 7
// bicycle:0 : price 270
// bicycle:7 : price 430