FT._LIST
- Usage:
-
FT._LIST [ REGEX pattern ]
- Complexity:
- O(N) where N is the number of indexes in the current database
- Module:
- valkey-search
- Since module version:
- 1.0.0
- ACL Categories:
- @admin, @slow, @read, @search
Lists the currently defined indexes for the current data base.
FT._LIST [REGEX <pattern>]
REGEX <pattern>(optional): Returns only indexes whose name partially matches the regular expression pattern. Use anchors such as^and$for exact-name matching. Patterns longer thansearch.max-regex-pattern-bytes(default 1024 bytes) are rejected.
Reply#
An array of strings. Each string is the name of an index in the current database. The index names are in no particular order.
Examples#
ft._list
1) index
2) products
3) users
4) transactionsft._list REGEX ^(index|users)$
1) index
2) users