Skip to content

Commit d6d18bf

Browse files
Merge pull request #70 from RedisInsight/ViktarStarastsenka-patch-1
Updating the Redis Query Engine name and including information to index missing or empty values
2 parents 2824abf + ffb79ac commit d6d18bf

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

src/sq/exact-match.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ FT.CREATE idx:bicycle // idx:bicycle name
1919
$.model AS model TEXT WEIGHT 1.0 // idx:bicycle $.model (model) as text
2020
$.description AS description TEXT WEIGHT 1.0 // idx:bicycle $.description (description) as text
2121
$.price AS price NUMERIC // idx:bicycle $.price (price) as numeric
22-
$.condition AS condition TAG SEPARATOR , // idx:bicycle $.condition (condition) as
22+
$.condition AS condition TAG SEPARATOR , INDEXEMPTY INDEXMISSING // idx:bicycle $.condition (condition) as
2323
// comma-separated tags
24+
// INDEXMISSING or INDEXEMPTY is used to search for documents
25+
// with empty or missing properties
2426
```
2527

2628
```redis:[run_confirmation=true] Load the JSON data
@@ -32,8 +34,8 @@ JSON.SET "bicycle:4" "." "{\"brand\": \"Noka Bikes\", \"model\": \"Kahuna\", \"p
3234
JSON.SET "bicycle:5" "." "{\"brand\": \"Breakout\", \"model\": \"XBN 2.1 Alloy\", \"price\": 810, \"description\": \"The XBN 2.1 Alloy is our entry-level road bike \\u2013 but that\\u2019s not to say that it\\u2019s a basic machine. With an internal weld aluminium frame, a full carbon fork, and the slick-shifting Claris gears from Shimano\\u2019s, this is a bike which doesn\\u2019t break the bank and delivers craved performance.\", \"condition\": \"new\"}"
3335
JSON.SET "bicycle:6" "." "{\"brand\": \"ScramBikes\", \"model\": \"WattBike\", \"price\": 2300, \"description\": \"The WattBike is the best e-bike for people who still feel young at heart. It has a Bafang 1000W mid-drive system and a 48V 17.5AH Samsung Lithium-Ion battery, allowing you to ride for more than 60 miles on one charge. It\\u2019s great for tackling hilly terrain or if you just fancy a more leisurely ride. With three working modes, you can choose between E-bike, assisted bicycle, and normal bike modes.\", \"condition\": \"new\"}"
3436
JSON.SET "bicycle:7" "." "{\"brand\": \"Peaknetic\", \"model\": \"Secto\", \"price\": 430, \"description\": \"If you struggle with stiff fingers or a kinked neck or back after a few minutes on the road, this lightweight, aluminum bike alleviates those issues and allows you to enjoy the ride. From the ergonomic grips to the lumbar-supporting seat position, the Roll Low-Entry offers incredible comfort. The rear-inclined seat tube facilitates stability by allowing you to put a foot on the ground to balance at a stop, and the low step-over frame makes it accessible for all ability and mobility levels. The saddle is very soft, with a wide back to support your hip joints and a cutout in the center to redistribute that pressure. Rim brakes deliver satisfactory braking control, and the wide tires provide a smooth, stable ride on paved roads and gravel. Rack and fender mounts facilitate setting up the Roll Low-Entry as your preferred commuter, and the BMX-like handlebar offers space for mounting a flashlight, bell, or phone holder.\", \"condition\": \"new\"}"
35-
JSON.SET "bicycle:8" "." "{\"brand\": \"nHill\", \"model\": \"Summit\", \"price\": 1200, \"description\": \"This budget mountain bike from nHill performs well both on bike paths and on the trail. The fork with 100mm of travel absorbs rough terrain. Fat Kenda Booster tires give you grip in corners and on wet trails. The Shimano Tourney drivetrain offered enough gears for finding a comfortable pace to ride uphill, and the Tektro hydraulic disc brakes break smoothly. Whether you want an affordable bike that you can take to work, but also take trail in mountains on the weekends or you\\u2019re just after a stable, comfortable ride for the bike path, the Summit gives a good value for money.\", \"condition\": \"new\"}"
36-
JSON.SET "bicycle:9" "." "{\"model\": \"ThrillCycle\", \"brand\": \"BikeShind\", \"price\": 815, \"description\": \"An artsy, retro-inspired bicycle that\\u2019s as functional as it is pretty: The ThrillCycle steel frame offers a smooth ride. A 9-speed drivetrain has enough gears for coasting in the city, but we wouldn\\u2019t suggest taking it to the mountains. Fenders protect you from mud, and a rear basket lets you transport groceries, flowers and books. The ThrillCycle comes with a limited lifetime warranty, so this little guy will last you long past graduation.\", \"condition\": \"refurbished\"}"
37+
JSON.SET "bicycle:8" "." "{\"brand\": \"nHill\", \"model\": \"Summit\", \"price\": 1200, \"description\": \"This budget mountain bike from nHill performs well both on bike paths and on the trail. The fork with 100mm of travel absorbs rough terrain. Fat Kenda Booster tires give you grip in corners and on wet trails. The Shimano Tourney drivetrain offered enough gears for finding a comfortable pace to ride uphill, and the Tektro hydraulic disc brakes break smoothly. Whether you want an affordable bike that you can take to work, but also take trail in mountains on the weekends or you\\u2019re just after a stable, comfortable ride for the bike path, the Summit gives a good value for money.\", \"condition\": \"\"}"
38+
JSON.SET "bicycle:9" "." "{\"model\": \"ThrillCycle\", \"brand\": \"BikeShind\", \"price\": 815, \"description\": \"An artsy, retro-inspired bicycle that\\u2019s as functional as it is pretty: The ThrillCycle steel frame offers a smooth ride. A 9-speed drivetrain has enough gears for coasting in the city, but we wouldn\\u2019t suggest taking it to the mountains. Fenders protect you from mud, and a rear basket lets you transport groceries, flowers and books. The ThrillCycle comes with a limited lifetime warranty, so this little guy will last you long past graduation.\"}"
3739
```
3840

3941
## Numeric fields
@@ -100,3 +102,18 @@ Here is an example for finding all bicycles that have a description containing t
100102
```redis Exact phrase match query
101103
FT.SEARCH idx:bicycle "@description:\"rough terrain\""
102104
```
105+
106+
## Search for missing or empty properties
107+
108+
You can search for properties that do not exist in a given document or existing properties with no value.
109+
110+
```redis Search for empty properties
111+
FT.SEARCH idx:bicycle '@condition:{""}' DIALECT 2 // DIALECT 2 is required
112+
```
113+
114+
```redis Search for missing properties
115+
FT.SEARCH idx:bicycle 'ismissing(@condition)' DIALECT 2 // use `ismissing` query function and
116+
// DIALECT 2
117+
```
118+
119+

src/sq/intro.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Redis Stack offers an enhanced Redis experience via the following search and query features:
1+
Redis Stack offers an enhanced Redis experience via the following Redis Query Engine features:
22

33
- A rich query language
44
- Incremental indexing on JSON and hash documents
@@ -7,7 +7,7 @@ Redis Stack offers an enhanced Redis experience via the following search and que
77
- Geospatial queries
88
- Aggregations
99

10-
The search and query features of Redis Stack allow you to use Redis as a:
10+
The Redis Query Engine features of Redis Stack allow you to use Redis as a:
1111

1212
- Document database
1313
- Vector database
@@ -16,8 +16,8 @@ The search and query features of Redis Stack allow you to use Redis as a:
1616

1717
### Prerequisites
1818

19-
[Redis Stack](https://redis.io/download?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) >=7.2.0-v7 \
19+
[Redis Stack](https://redis.io/download?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) >=7.4.0-v0 \
2020
OR \
21-
[RediSearch](https://github.com/RediSearch/RediSearch/) >=2.8.11 \
21+
[Redis Query Engine](https://github.com/RediSearch/RediSearch/) >=2.10.5 \
2222
OR \
2323
A free Redis Stack instance on [Redis Cloud](https://redis.com/try-free/?utm_source=redis\&utm_medium=app\&utm_campaign=redisinsight_vecsim_guide "Redis Cloud").

src/sq/learn-more.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
### Documentation
22

3-
* [Search and query home](https://redis.io/docs/interact/search-and-query/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials)
3+
* [Redis Query Engine home](https://redis.io/docs/interact/search-and-query/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials)
4+
* [Best practices for scalable Redis Query Engine](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/search/scalable-query-best-practices/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials)
45

56
### Social
67

7-
* [Search and query on GitHub](https://github.com/RediSearch/RediSearch)
8-
* [Search and query on Discord](https://discord.com/channels/697882427875393627/1187464938218856501)
9-
* [Search and query on Stack Overflow](https://stackoverflow.com/questions/tagged/redisearch)
8+
* [Redis Query Engine on GitHub](https://github.com/RediSearch/RediSearch)
9+
* [Redis Query Engine on Discord](https://discord.com/channels/697882427875393627/1187464938218856501)
10+
* [Redis Query Engine on Stack Overflow](https://stackoverflow.com/questions/tagged/redisearch)
1011

1112
### Blogs
1213

0 commit comments

Comments
 (0)