Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 609 Bytes

count-items-matching-a-search-criteria.md

File metadata and controls

24 lines (15 loc) · 609 Bytes

Count Items Matching A Search Criteria

Category: Redis

Count the number of items in a search index

Count the number of items in a Redis search index called "player-name-idx" using LIMIT 0 0

FT.SEARCH player-name-idx "*" LIMIT 0 0

Count the number of items matching a search criteria for a field

Count all matches in a Redis search index called "player-name-idx" where the value for the name`` field contains smith`:

FT.SEARCH player-name-idx "@name: smith" LIMIT 0 0

Note:

Searches in Redis are case insensitive. For example, "Smith" equates to "smith".