镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Provide instructions for users to run Redis Search demo locally - #4492

Open
paoloredis wants to merge 3 commits into
mainfrom
DOC-7217
Open

paoloredis wants to merge 3 commits into
mainfrom
DOC-7217

Conversation

@paoloredis

@paoloredis paoloredis commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

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.

paoloredis and others added 2 commits November 4, 2026 15:57
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>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7217

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 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 dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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**.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants