Skip to content

Commit cc88c41

Browse files
committed
Added getting started section
1 parent fbf03c6 commit cc88c41

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

README.adoc

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,61 @@ image:https://img.shields.io/maven-central/v/{project-group}/{project-name}[Down
1010
image:https://img.shields.io/nexus/s/{project-group}/{project-name}?server=https%3A%2F%2Fs01.oss.sonatype.org[Snapshot,link="https://s01.oss.sonatype.org/#nexus-search;quick~{project-name}"]
1111
image:https://codecov.io/gh/{project-owner}/sql-redis/branch/master/graph/badge.svg?token=9I4H9NOBRQ["Coverage", link="https://codecov.io/gh/{project-owner}/sql-redis"]
1212

13-
SQL Redis is a SQL interface to RediSearch implemented as a https://trino.io[Trino] connector.
13+
SQL Redis is a SQL interface to RediSearch implemented as a https://trino.io[Trino] connector.
14+
15+
== Getting Started
16+
17+
=== Install Trino
18+
19+
https://trino.io/docs/current/installation.html
20+
21+
For macOS: `brew install trino`
22+
23+
=== Install the connector
24+
25+
1. Download latest `trino-redisearch-*.zip` release from https://github.com/redis-field-engineering/sql-redis/releases
26+
27+
2. Unzip the release without any directory structure under `plugin/redisearch` in the Trino home directory:
28+
+
29+
[source,bash]
30+
----
31+
unzip -j trino-redisearch-early-access.zip -d /opt/trino/plugin/redisearch
32+
----
33+
34+
3. Create a `redisearch.properties` file under the Trino `etc/catalog` directory:
35+
+
36+
.redisearch.properties
37+
[source,properties]
38+
----
39+
connector.name=redisearch
40+
redisearch.uri=redis://localhost:6379
41+
----
42+
43+
=== Run
44+
45+
1. Start Trino server:
46+
+
47+
[source,bash]
48+
----
49+
`trino-server start`
50+
----
51+
2. Connect to Trino using the CLI:
52+
+
53+
[source,bash]
54+
----
55+
`trino --catalog redisearch --schema default`
56+
----
57+
3. Run a SQL query:
58+
+
59+
[source,bash]
60+
----
61+
trino:default> select count(*) from myIdx;
62+
_col0
63+
------
64+
4431
65+
(1 row)
66+
67+
Query 20211231_021841_00009_gexvh, FINISHED, 1 node
68+
Splits: 10 total, 10 done (100.00%)
69+
0.45 [4.43K rows, 335B] [9.89K rows/s, 748B/s]
70+
----

0 commit comments

Comments
 (0)