I have saved the data using semicolon.
redis> keys party:* 1) "party:congress:president" 2) "party:bjp:president" 3) "party:bjp" 4) "party:sena"
Is there any command that will list of all the parties? In case of above example, I expect
congress bjp sena
Wildcard Searches To perform a multiple character wildcard search use the "*" symbol. You can also use the wildcard searches in the middle of a term. Note: You cannot use a * or ? symbol as the first character of a search.
The asterisk (*) is used in many databases for truncation. Wildcards — a symbol used to represent any character. Wildcards can usually be used at the end of a word or within a word. The pound symbol (#) is used in many databases as a wildcard.
The asterisk “*” and the question mark “?” are the two main wildcard characters in Access you need to know. The asterisk represents multiple unknown characters. For example, the criteria “N*” would find all “N” words like “Nebraska,” “Ned,” “Not,” “Never Ever,” etc. The question mark represents one unknown character.
No, there is no command to do that. But it would be trivial to implement it on client side, if you really have to.
Applications should never use the KEYS commands to retrieve data. KEYS blocks the whole Redis instance while it is scanning linearly the millions of keys you have stored. It is more a debugging command supposed to be used in administration tools.
With Redis, there is no btree structure to index the keys, so you cannot query for keys, except if your keys are stored in an existing collection (set, zset, etc ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With