@@ -54,7 +54,7 @@ You can then easily match a user to their preferred type of bike within a reques
54
54
55
55
``` redis:[run_confirmation=true]
56
56
// Match leisure bikes within a price of 200 and 300
57
- FT.SEARCH idx:smpl_bicycle "@type:{leisure } @price:[200 300 ]" RETURN 4 brand model type price
57
+ FT.SEARCH idx:smpl_bicycle "@type:{mountain } @price:[400 450 ]" RETURN 4 brand model type price
58
58
```
59
59
60
60
### Location-based search
@@ -64,12 +64,11 @@ Location-based search involves finding and retrieving data that is relevant to a
64
64
``` redis:[run_confirmation=true]
65
65
// Add a restaurant as JSON
66
66
JSON.SET sample_restaurant:341 $ '{
67
- "name": "Galusca ",
68
- "cuisine": "Moldovan ",
69
- "location": "47.0159,28.8107 "
67
+ "name": "Zen Galushca ",
68
+ "cuisine": "Japanese ",
69
+ "location": "-98.1221,30.8232 "
70
70
}'
71
71
```
72
-
73
72
``` redis:[run_confirmation=true]
74
73
//Create an index of your restaurant data
75
74
FT.CREATE "idx:smpl_restaurant"
@@ -82,8 +81,8 @@ FT.CREATE "idx:smpl_restaurant"
82
81
```
83
82
84
83
``` redis:[run_confirmation=true]
85
- // Find a Japanese restaurant within a 20 mile radius
86
- FT.SEARCH idx:smpl_restaurant "@cuisine:{japanese} @location:[-98.1179,30.671 20 mi]" RETURN 2 restaunt_name location
84
+ // Find a Japanese restaurant within a 50 mile radius
85
+ FT.SEARCH idx:smpl_restaurant "@cuisine:{japanese} @location:[-98.1179,30.671 50 mi]" RETURN 2 restaunt_name location
87
86
```
88
87
89
88
### Session store
0 commit comments