What's New at Redis? May 2023
Eric Silva MBA
AI & Security Evangelist and Product Marketing Leader, Six Sigma Black Belt
It's still May and it's not too late to attend 2023 Redis Days. Join Redis Chief Product Officer Tim Hall and VP of Product Marketing Udi Gotlieb as they review exciting updates to Redis Enterprise and learn from other Redis Innovators and Industry experts.
Redis Real-time Inventory Architectures
Ecommerce retailers are under pressure to deliver accurate inventory positions and customer experiences to compete for profitable omnichannel consumers. Redis has created new technical solutions for retailers and outlined them in our real-time inventory solution brief.
What is Fuzzy Matching? How is it a part of A.I.?
Yes, it's the starting point for artificial intelligence. Learn why in this redis blog called "What is Fuzzy Matching?" Then check out Code Corner below for some code examples. Just as a calculator works with numbers, fuzzy matching is basically doing the same thing with letters, it's also called approximate string matching. It's pretty cool if you like math or not.
Happening tomorrow! Tech Talk: Redis Provisioning: Build vs. Buy
May 31, 2023
Now is a good time to compare your options between building with Redis open source and Redis Enterprise.
Coming to a City Near You! Redis Real-Time Search and Query Workshops
Join Redis for a hands on real-time search and query workshop, register today.
June 1 - Denver, June 7 -? San Jose and Chicago, June 14 - Seattle and New York, June 21 - Dallas and Boston (I am going to Boston, meet me there), June 28 - Los Angeles and Austin
Redis Code Corner
Once you read the Fuzzy Matching blog to learn what Levenshtein distance (LD) is, and how it enables auto-suggestions, here's the Redis code to see it in action:
Let's create some data and index on the NAME field using Redis Enterprise built-in JSON document database and Redis Search and Query features:
json.set key:1 $ '{"name": "Daniel"}'
json.set key:2 $ '{"name": "Daniels"}'
json.set key:3 $ '{"name": "Danielson"}'
json.set key:4 $ '{"name": "McDaniel"}'
json.set key:5 $ '{"name": "McDaniels"}'
json.set key:6 $ '{"name": "McDanielson"}'
ft.create idx on json prefix 1 key: schema $.name as name text
We search our database index keys for "Daniel":
> ft.search idx "@name:daniel"
1) "2"
2) "key:1"
3) 1) "$"
???2) "{\"name\":\"Daniel\"}"
4) "key:2"
5) 1) "$"
???2) "{\"name\":\"Daniels\"}"
Redis Search and Query results in two keys: Daniel and Daniels
Using Redis Search and Query fuzzy search feature with an LD of 1, we can get the same results in this case with "daniel" plus any 1 character on either end noted by the % syntax:
> ft.search idx "@name:%daniel%"
领英推荐
1) "2"
2) "key:1"
3) 1) "$"
???2) "{\"name\":\"Daniel\"}"
4) "key:2"
5) 1) "$"
???2) "{\"name\":\"Daniels\"}"
Redis Search and Query results in two keys: Daniel and Daniels
Using Fuzzy Search with an LD of 2, we can get one more result "McDaniel" with the addition of 2 characters on either side of "daniel" noted by the %% syntax:
> ft.search idx "@name:%%daniel%%"
1) "3"
2) "key:4"
3) 1) "$"
???2) "{\"name\":\"McDaniel\"}"
4) "key:1"
5) 1) "$"
???2) "{\"name\":\"Daniel\"}"
6) "key:2"
7) 1) "$"
???2) "{\"name\":\"Daniels\"}"
Using Fuzzy Search with an LD of 3, we receive two more results, "Danielson", "McDaniels" with the addition of 3 characters on either side of "daniel" noted by the %%% syntax:
> ft.search idx "@name:%%%daniel%%%"
1) "5"
2) "key:3"
3) 1) "$"
???2) "{\"name\":\"Danielson\"}"
4) "key:5"
5) 1) "$"
???2) "{\"name\":\"McDaniels\"}"
6) "key:4"
7) 1) "$"
???2) "{\"name\":\"McDaniel\"}"
8) "key:1"
9) 1) "$"
???2) "{\"name\":\"Daniel\"}"
10) "key:2"
11) 1) "$"
???2) "{\"name\":\"Daniels\"}"?
It's that easy and fast to do advanced fuzzy matching with Redis Enterprise Search and Query. Happy coding!