Redis › RedisSearch (Full Text Search)
How do you write a RedisSearch query that combines full text search with a numeric range filter?
IntermediateAnswer
You use the FT.SEARCH command with a query string that includes your text search terms alongside a numeric filter expression targeting a specific field, using syntax like an at sign followed by the field name and a range in square brackets, letting you combine text relevance search with precise numeric filtering in a single query.
FT.SEARCH product_idx '@name:laptop @price:[500 1500]'Real-world example An online store lets customers search for laptops specifically within their budget range, combining a text search for the word laptop with a numeric filter restricting results to products priced between five hundred and fifteen hundred dollars.