Redis › RedisSearch (Full Text Search)
How do you create a search index in RedisSearch, and what does defining a schema for that index actually do?
BeginnerAnswer
You use the FT.CREATE command, specifying which keys to index based on a prefix pattern and defining a schema that maps specific fields within your data to search field types like TEXT for full text searchable content, NUMERIC for range queries, or TAG for exact match filtering, telling RedisSearch exactly how to index and later let you query each field.
FT.CREATE product_idx ON HASH PREFIX 1 product: SCHEMA name TEXT price NUMERIC category TAGReal-world example A product catalog defines a search index specifying that the name field should support full text search, the price field should support numeric range queries, and the category field should support exact tag based filtering.