Repository navigation
Provide instructions for users to run Redis Search demo locally - #4492
paoloredis wants to merge 3 commits into
Conversation
A reviewer suggested letting readers run the query demo against their own Redis, with Redis Insight as the main option and redis-cli as the alternative. The page now has a "Try it yourself" section: - A setup file, static/code/search-demo/setup.redis, with the demo's 31 commands: the three indexes, then the restaurants, the orders, and the Location step's fields. It can be downloaded, or copied from the page. - Steps for Redis Insight (paste into Workbench, or upload the file with Bulk actions > Upload Data) and for redis-cli, and commands to remove the data and indexes afterwards. - A Copy button on each query in the demo, which copies the command as it's shown. Loaded into Redis 8.10, the setup file reproduces all 356 of the demo's recorded replies. Two things had to be right for that: - The indexes come first. Created after the data, an index numbers the existing keys in the order Redis happens to scan them, so results that tie on SORTBY can come back in a different order than the demo's. - The order of tied groups in FT.AGGREGATE depended on how the data was loaded, so each aggregation now sorts ties by the group's value as well (SORTBY 4 @<value> DESC @<group> ASC). The 18 aggregations were re-recorded, and the query's description says how ties sort. A new static-download shortcode links to a file in static/ under the site's base URL. The download shortcode takes the link as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The embed-code shortcode printed a newline before the file, so the setup file's code block on the query demo page started with an empty line, and had more space above the code than below. The REST API page, the shortcode's only other user, had the same empty line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
🧠 Redis MemoryFound 6 related items from repository history (1 new this commit):
Memory updated at 090a226 |
…s-cli tabs redis.io doesn't serve .redis files, so the setup file's download link redirected to a missing page. The setup commands now sit in two tabs. The Redis Insight tab has the commands to paste into Workbench. The redis-cli tab has one terminal command that feeds them to redis-cli, because pasting several commands at a redis-cli prompt runs only the first. Each tool's steps point to its tab, and the unused static-download shortcode is gone. embed-code now drops the file's final newline, so the redis-cli tab's EOF follows the last command directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dwdougherty
left a comment
There was a problem hiding this comment.
Just the one comment (see below). Otherwise, LGTM.
|
|
||
| 1. Paste the command from the **redis-cli** tab into a terminal, and replace `<host>` and `<port>` with your database's. If your database needs a username and password, add `--user <username> --pass <password>` after the port. | ||
| 2. Run the command. It loads all 31 setup commands at once. | ||
| 3. Connect with `redis-cli -h <host> -p <port>`, copy a query from the demo, and run it. The reply is the same as the demo's **The output**. |
There was a problem hiding this comment.
| 3. Connect with `redis-cli -h <host> -p <port>`, copy a query from the demo, and run it. The reply is the same as the demo's **The output**. | |
| 3. Connect with `redis-cli -h <host> -p <port>`, add `--user <username> --pass <password>` if you used them in step 1, copy a query from the demo, and run it. The reply is the same as the demo's **The output**. |
Note
Overview
Unable to generate summary.
Reviewed by Cursor Bugbot for commit 090a226. Bugbot is set up for automated code reviews on this repo. Configure here.