There is no separate update command for search. Use regular Redis write commands to change your data.
- JSON commands such as
JSON.SET,JSON.MERGE, … - Hash commands such as
HSET,HINCRBY, … - String commands such as
SET,SETEX, … - Stream commands such as
XADD,XDEL,XTRIM, … - Generic commands such as
DEL,EXPIRE,PEXPIRE, …
SEARCH.WAITINDEXING when you need to ensure queries reflect recent changes.
JSON Documents
For JSON indexes, any JSON command that modifies a matching key updates the indexed document.- TypeScript
- Python
- Redis CLI
Hash Documents
For hash indexes, any hash command that modifies a matching key updates the indexed document.- TypeScript
- Python
- Redis CLI
String Documents
For string indexes, indexed keys must contain valid JSON strings. Any command that replaces or modifies the matching string key updates the indexed document.- TypeScript
- Python
- Redis CLI
Stream Entries
For a stream index,XADD adds one document whose ID is the stream entry ID. Commands that remove
entries, including XDEL and XTRIM, remove the corresponding documents from the index.
Deletes
Deleting a matching key removes the document from a JSON, hash, or string index. Deleting a stream removes all of that stream’s entry documents from its stream index.- TypeScript
- Python
- Redis CLI
Expiration
When a matching key expires, Upstash Redis Search removes the expired document from the index.- TypeScript
- Python
- Redis CLI