await redis.hset("article:1", {
title: "Getting Started with Redis Search",
body: "Redis Search provides powerful full-text search capabilities directly in Redis. In this tutorial, we'll explore how to create indexes, define schemas, and write queries. Full-text search allows you to find documents based on their content rather than just their keys. This is essential for building search features in modern applications.",
summary: "Learn how to add full-text search to your Redis application with practical examples.",
author: "Jane Smith",
tags: "redis,search,tutorial",
publishedAt: "2024-03-15T10:00:00Z",
updatedAt: "2024-03-15T10:00:00Z",
published: "true",
viewCount: "1542",
});
await redis.hset("article:2", {
title: "Advanced Query Techniques for Search",
body: "Once you've mastered the basics, it's time to explore advanced query techniques. Boolean operators let you combine conditions with AND, OR, and NOT logic. Phrase matching ensures words appear in sequence. Fuzzy matching handles typos gracefully. Together, these features enable sophisticated search experiences.",
summary: "Master boolean operators, phrase matching, and fuzzy search for better results.",
author: "John Doe",
tags: "redis,search,advanced",
publishedAt: "2024-03-20T14:30:00Z",
updatedAt: "2024-03-22T09:15:00Z",
published: "true",
viewCount: "892",
});
await redis.hset("article:3", {
title: "Building Real-Time Search with Redis",
body: "Real-time search requires instant indexing and low-latency queries. Redis excels at both. When you write data to Redis, the search index updates automatically. Queries execute in milliseconds, even with millions of documents. This makes Redis ideal for applications where search results must reflect the latest data.",
summary: "Build search features that update instantly as data changes.",
author: "Jane Smith",
tags: "redis,real-time,performance",
publishedAt: "2024-03-25T08:00:00Z",
updatedAt: "2024-03-25T08:00:00Z",
published: "true",
viewCount: "2103",
});