Skip to content

Commit a424291

Browse files
authored
Merge branch 'master' into add-vamana-vector-type-to-search
2 parents a68ce15 + 9177a76 commit a424291

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

.github/actions/run-tests/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
2626
# Mapping of redis version to redis testing containers
2727
declare -A redis_version_mapping=(
28-
["8.2.x"]="8.2-RC1-pre"
28+
["8.2.x"]="8.2-rc2-pre"
2929
["8.0.x"]="8.0.2"
3030
["7.4.x"]="rs-7.4.0-v5"
3131
["7.2.x"]="rs-7.2.0-v17"

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Go
22

33
on:
44
push:
5-
branches: [master, v9, v9.7, v9.8]
5+
branches: [master, v9, v9.7, v9.8, 'ndyakov/*', 'ofekshenawa/*', 'htemelski-redis/*', 'ce/*']
66
pull_request:
7-
branches: [master, v9, v9.7, v9.8]
7+
branches: [master, v9, v9.7, v9.8, 'ndyakov/*', 'ofekshenawa/*', 'htemelski-redis/*', 'ce/*']
88

99
permissions:
1010
contents: read
@@ -44,7 +44,7 @@ jobs:
4444
4545
# Mapping of redis version to redis testing containers
4646
declare -A redis_version_mapping=(
47-
["8.2.x"]="8.2-RC1-pre"
47+
["8.2.x"]="8.2-rc2-pre"
4848
["8.0.x"]="8.0.2"
4949
["7.4.x"]="rs-7.4.0-v5"
5050
)

doctests/geo_index_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ func ExampleClient_geoindex() {
199199
// OK
200200
// OK
201201
// OK
202-
// {1 [{product:46885 <nil> <nil> <nil> map[$:{"city":"Denver","description":"Navy Blue Slippers","location":"-104.991531, 39.742043","price":45.99}]}]}
202+
// {1 [{product:46885 <nil> <nil> <nil> map[$:{"city":"Denver","description":"Navy Blue Slippers","location":"-104.991531, 39.742043","price":45.99}] <nil>}]}
203203
// OK
204204
// OK
205205
// OK
206206
// OK
207207
// OK
208-
// {1 [{shape:4 <nil> <nil> <nil> map[$:[{"geom":"POINT (2 2)","name":"Purple Point"}]]}]}
208+
// {1 [{shape:4 <nil> <nil> <nil> map[$:[{"geom":"POINT (2 2)","name":"Purple Point"}]] <nil>}]}
209209
}

doctests/home_json_example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func ExampleClient_search_json() {
219219
// STEP_END
220220

221221
// Output:
222-
// {1 [{user:3 <nil> <nil> <nil> map[$:{"age":35,"city":"Tel Aviv","email":"[email protected]","name":"Paul Zamir"}]}]}
222+
// {1 [{user:3 <nil> <nil> <nil> map[$:{"age":35,"city":"Tel Aviv","email":"[email protected]","name":"Paul Zamir"}] <nil>}]}
223223
// London
224224
// Tel Aviv
225225
// 0
@@ -329,5 +329,5 @@ func ExampleClient_search_hash() {
329329
// STEP_END
330330

331331
// Output:
332-
// {1 [{huser:3 <nil> <nil> <nil> map[age:35 city:Tel Aviv email:[email protected] name:Paul Zamir]}]}
332+
// {1 [{huser:3 <nil> <nil> <nil> map[age:35 city:Tel Aviv email:[email protected] name:Paul Zamir] <nil>}]}
333333
}

doctests/search_quickstart_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,6 @@ func ExampleClient_search_qs() {
257257

258258
// Output:
259259
// Documents found: 10
260-
// {1 [{bicycle:0 <nil> <nil> <nil> map[$:{"brand":"Velorim","condition":"new","description":"Small and powerful, the Jigger is the best ride for the smallest of tikes! This is the tiniest kids’ pedal bike on the market available without a coaster brake, the Jigger is the vehicle of choice for the rare tenacious little rider raring to go.","model":"Jigger","price":270}]}]}
261-
// {1 [{bicycle:4 <nil> <nil> <nil> map[$:{"brand":"Noka Bikes","condition":"used","description":"Whether you want to try your hand at XC racing or are looking for a lively trail bike that's just as inspiring on the climbs as it is over rougher ground, the Wilder is one heck of a bike built specifically for short women. Both the frames and components have been tweaked to include a women’s saddle, different bars and unique colourway.","model":"Kahuna","price":3200}]}]}
260+
// {1 [{bicycle:0 <nil> <nil> <nil> map[$:{"brand":"Velorim","condition":"new","description":"Small and powerful, the Jigger is the best ride for the smallest of tikes! This is the tiniest kids’ pedal bike on the market available without a coaster brake, the Jigger is the vehicle of choice for the rare tenacious little rider raring to go.","model":"Jigger","price":270}] <nil>}]}
261+
// {1 [{bicycle:4 <nil> <nil> <nil> map[$:{"brand":"Noka Bikes","condition":"used","description":"Whether you want to try your hand at XC racing or are looking for a lively trail bike that's just as inspiring on the climbs as it is over rougher ground, the Wilder is one heck of a bike built specifically for short women. Both the frames and components have been tweaked to include a women’s saddle, different bars and unique colourway.","model":"Kahuna","price":3200}] <nil>}]}
262262
}

search_commands.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ type Document struct {
488488
Payload *string
489489
SortKey *string
490490
Fields map[string]string
491+
Error error
491492
}
492493

493494
type AggregateQuery []interface{}
@@ -1713,7 +1714,13 @@ func parseFTSearch(data []interface{}, noContent, withScores, withPayloads, with
17131714
if i < len(data) {
17141715
fields, ok := data[i].([]interface{})
17151716
if !ok {
1716-
return FTSearchResult{}, fmt.Errorf("invalid document fields format")
1717+
if data[i] == proto.Nil || data[i] == nil {
1718+
doc.Error = proto.Nil
1719+
doc.Fields = map[string]string{}
1720+
fields = []interface{}{}
1721+
} else {
1722+
return FTSearchResult{}, fmt.Errorf("invalid document fields format")
1723+
}
17171724
}
17181725

17191726
for j := 0; j < len(fields); j += 2 {

0 commit comments

Comments
 (0)