Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Redis Stack for Application Modernization

You're reading from   Redis Stack for Application Modernization Build real-time multi-model applications at any scale with Redis

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781837638185
Length 336 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mirko Ortensi Mirko Ortensi
Author Profile Icon Mirko Ortensi
Mirko Ortensi
Luigi Fugaro Luigi Fugaro
Author Profile Icon Luigi Fugaro
Luigi Fugaro
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Introduction to Redis Stack
2. Chapter 1: Introducing Redis Stack FREE CHAPTER 3. Chapter 2: Developing Modern Use Cases with Redis Stack 4. Chapter 3: Getting Started with Redis Stack 5. Chapter 4: Setting Up Client Libraries 6. Part 2: Data Modeling
7. Chapter 5: Redis Stack as a Document Store 8. Chapter 6: Redis Stack as a Vector Database 9. Chapter 7: Redis Stack as a Time Series Database 10. Chapter 8: Understanding Probabilistic Data Structures 11. Part 3: From Development to Production
12. Chapter 9: The Programmability of Redis Stack 13. Chapter 10: RedisInsight – the Data Management GUI 14. Chapter 11: Using Redis Stack as a Primary Database 15. Chapter 12: Managing Development and Production Environments 16. Index 17. Other Books You May Enjoy

Performing similarity search

Now that we have created an index that’s suitable to the vector length and type (FLOAT32 or FLOAT64), and we have chosen the right distance concerning the data represented by the vector embeddings (we care about the orientation of the vectors, or we are also interested in their magnitude), we can perform a comparison. Let’s consider a simple scenario based on the former example. We have three sentences in our database stored as Hashes, along with their vector embeddings:

  • doc:1 stores This is a technical document, it describes the SID sound chip of the Commodore 64
  • doc:2 stores The Little Prince is a short story by Antoine de Saint-Exupéry, the best known of his literary productions, published on April 6, 1943 in New York
  • doc:3 stores Pasta alla carbonara is a characteristic dish of Lazio and more particularly of Rome, prepared with popular ingredients and with an intense flavour.

We will calculate the corresponding...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime