Skip to content

Commit fe3b655

Browse files
committed
docs: fix redis download links
1 parent fb02e77 commit fe3b655

File tree

5 files changed

+180
-19
lines changed

5 files changed

+180
-19
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ RedisVL is your go-to client for:
4444
Add RedisVL to your Java (17+) project using Maven or Gradle:
4545

4646
**Maven:**
47+
4748
```xml
4849
<dependency>
4950
<groupId>com.redis</groupId>
@@ -53,18 +54,22 @@ Add RedisVL to your Java (17+) project using Maven or Gradle:
5354
```
5455

5556
**Gradle:**
57+
5658
```gradle
5759
implementation 'com.redis:redisvl:0.12.0'
5860
```
5961

6062
## Setting up Redis
63+
6164
Choose from multiple Redis deployment options:
6265

6366
1. [Redis Cloud](https://redis.io/try-free): Managed cloud database (free tier available)
64-
2. [Redis Stack](https://redis.io/docs/getting-started/install-stack/docker/): Docker image for development
67+
2. [Redis on Docker](https://hub.docker.com/_/redis): Docker image for development
68+
6569
```bash
6670
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
6771
```
72+
6873
3. [Redis Enterprise](https://redis.io/enterprise/): Commercial, self-hosted database
6974
4. [Azure Managed Redis](https://azure.microsoft.com/en-us/products/managed-redis): Fully managed Redis Enterprise on Azure
7075

@@ -395,6 +400,7 @@ Check out the [notebooks](notebooks/) directory for interactive Jupyter notebook
395400
The notebooks use Java kernel support via JJava. To run them:
396401
397402
1. **Start the notebook environment:**
403+
398404
```bash
399405
cd notebooks
400406
docker compose up -d
@@ -404,6 +410,7 @@ The notebooks use Java kernel support via JJava. To run them:
404410
Navigate to [http://localhost:8888/](http://localhost:8888/)
405411
406412
3. **Stop when done:**
413+
407414
```bash
408415
docker compose down
409416
```

docs/content/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ asciidoc:
1313
redisvl-version: '0.1.0-SNAPSHOT'
1414
url-redisvl-java: https://github.com/redis/redis-vl-java
1515
url-redisvl-python: https://github.com/redis/redis-vl-python
16-
url-redis-stack: https://redis.io/docs/stack/
16+
url-redis-stack: https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/
1717
url-redis-search: https://redis.io/docs/stack/search/
1818
url-redis-json: https://redis.io/docs/stack/json/

notebooks/01_getting_started.ipynb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"\n",
2020
"Prerequisites:\n",
2121
"- Ensure `RedisVL` is installed in your Java environment.\n",
22-
"- Have a running instance of [Redis Stack](https://redis.io/docs/install/install-stack/) or [Redis Cloud](https://redis.io/cloud).\n",
22+
"- Have a running instance of [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) or [Redis Cloud](https://redis.io/cloud).\n",
2323
"\n",
2424
"_____"
2525
]
@@ -285,7 +285,11 @@
285285
"cell_type": "code",
286286
"execution_count": 5,
287287
"id": "mv1vdixzgjj",
288-
"metadata": {},
288+
"metadata": {
289+
"vscode": {
290+
"languageId": "java"
291+
}
292+
},
289293
"outputs": [
290294
{
291295
"name": "stdout",
@@ -354,7 +358,11 @@
354358
"cell_type": "code",
355359
"execution_count": 7,
356360
"id": "pcexez2r69j",
357-
"metadata": {},
361+
"metadata": {
362+
"vscode": {
363+
"languageId": "java"
364+
}
365+
},
358366
"outputs": [
359367
{
360368
"name": "stdout",

notebooks/05_hash_vs_json.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"1. Have installed RedisVL and have that environment active for this notebook.\n",
1414
"2. Have a running Redis Stack or Redis Enterprise instance with RediSearch > 2.4 activated.\n",
1515
"\n",
16-
"For example, you can run [Redis Stack](https://redis.io/docs/install/install-stack/) locally with Docker:\n",
16+
"For example, you can run [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) locally with Docker:\n",
1717
"\n",
1818
"```bash\n",
1919
"docker run -d -p 6379:6379 -p 8001:8001 redis/redis-stack:latest\n",

notebooks/11_advanced_queries.ipynb

Lines changed: 159 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@
44
"cell_type": "markdown",
55
"id": "intro",
66
"metadata": {},
7-
"source": "# Advanced Query Types\n\nIn this notebook, we will explore advanced query types available in RedisVL:\n\n1. **`TextQuery`**: Full text search with advanced scoring\n2. **`AggregateHybridQuery`**: Combines text and vector search for hybrid retrieval\n3. **`MultiVectorQuery`**: Search over multiple vector fields simultaneously\n\nThese query types are powerful tools for building sophisticated search applications that go beyond simple vector similarity search.\n\nPrerequisites:\n- Ensure RedisVL4J is available in your Java environment.\n- Have a running instance of [Redis Stack](https://redis.io/docs/install/install-stack/) or [Redis Cloud](https://redis.io/cloud)."
7+
"source": [
8+
"# Advanced Query Types\n",
9+
"\n",
10+
"In this notebook, we will explore advanced query types available in RedisVL:\n",
11+
"\n",
12+
"1. **`TextQuery`**: Full text search with advanced scoring\n",
13+
"2. **`AggregateHybridQuery`**: Combines text and vector search for hybrid retrieval\n",
14+
"3. **`MultiVectorQuery`**: Search over multiple vector fields simultaneously\n",
15+
"\n",
16+
"These query types are powerful tools for building sophisticated search applications that go beyond simple vector similarity search.\n",
17+
"\n",
18+
"Prerequisites:\n",
19+
"- Ensure RedisVL4J is available in your Java environment.\n",
20+
"- Have a running instance of [Redis Stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) or [Redis Cloud](https://redis.io/cloud)."
21+
]
822
},
923
{
1024
"cell_type": "markdown",
@@ -423,69 +437,179 @@
423437
"cell_type": "markdown",
424438
"id": "hybrid-query-intro",
425439
"metadata": {},
426-
"source": "## 2. AggregateHybridQuery: Combining Text and Vector Search\n\nThe `AggregateHybridQuery` combines text search and vector similarity to provide the best of both worlds:\n- **Text search**: Finds exact keyword matches\n- **Vector search**: Captures semantic similarity\n\nResults are scored using a weighted combination:\n\n```\nhybrid_score = (alpha) * vector_score + (1 - alpha) * text_score\n```\n\nWhere `alpha` controls the balance between vector and text search (default: 0.7)."
440+
"source": [
441+
"## 2. AggregateHybridQuery: Combining Text and Vector Search\n",
442+
"\n",
443+
"The `AggregateHybridQuery` combines text search and vector similarity to provide the best of both worlds:\n",
444+
"- **Text search**: Finds exact keyword matches\n",
445+
"- **Vector search**: Captures semantic similarity\n",
446+
"\n",
447+
"Results are scored using a weighted combination:\n",
448+
"\n",
449+
"```\n",
450+
"hybrid_score = (alpha) * vector_score + (1 - alpha) * text_score\n",
451+
"```\n",
452+
"\n",
453+
"Where `alpha` controls the balance between vector and text search (default: 0.7)."
454+
]
427455
},
428456
{
429457
"cell_type": "markdown",
430458
"id": "hybrid-query-basic-intro",
431459
"metadata": {},
432-
"source": "### Basic Aggregate Hybrid Query\n\nLet's search for \"running shoes\" with both text and semantic search:"
460+
"source": [
461+
"### Basic Aggregate Hybrid Query\n",
462+
"\n",
463+
"Let's search for \"running shoes\" with both text and semantic search:"
464+
]
433465
},
434466
{
435467
"cell_type": "code",
436468
"execution_count": null,
437469
"id": "hybrid-query-basic",
438470
"metadata": {},
439471
"outputs": [],
440-
"source": "AggregateHybridQuery hybridQuery = AggregateHybridQuery.builder()\n .text(\"running shoes\")\n .textFieldName(\"brief_description\")\n .vector(new float[]{0.1f, 0.2f, 0.1f})\n .vectorFieldName(\"text_embedding\")\n .returnFields(Arrays.asList(\"product_id\", \"brief_description\", \"category\", \"price\"))\n .numResults(5)\n .build();\n\nList<Map<String, Object>> hybridResults = index.query(hybridQuery);\n\nSystem.out.println(\"Hybrid search results:\");\nfor (Map<String, Object> result : hybridResults) {\n System.out.println(\" \" + result.get(\"product_id\") + \": \" + result.get(\"brief_description\"));\n}"
472+
"source": [
473+
"AggregateHybridQuery hybridQuery = AggregateHybridQuery.builder()\n",
474+
" .text(\"running shoes\")\n",
475+
" .textFieldName(\"brief_description\")\n",
476+
" .vector(new float[]{0.1f, 0.2f, 0.1f})\n",
477+
" .vectorFieldName(\"text_embedding\")\n",
478+
" .returnFields(Arrays.asList(\"product_id\", \"brief_description\", \"category\", \"price\"))\n",
479+
" .numResults(5)\n",
480+
" .build();\n",
481+
"\n",
482+
"List<Map<String, Object>> hybridResults = index.query(hybridQuery);\n",
483+
"\n",
484+
"System.out.println(\"Hybrid search results:\");\n",
485+
"for (Map<String, Object> result : hybridResults) {\n",
486+
" System.out.println(\" \" + result.get(\"product_id\") + \": \" + result.get(\"brief_description\"));\n",
487+
"}"
488+
]
441489
},
442490
{
443491
"cell_type": "markdown",
444492
"id": "hybrid-query-alpha",
445493
"metadata": {},
446-
"source": "### Adjusting the Alpha Parameter\n\nThe `alpha` parameter controls the weight between vector and text search:\n- `alpha=1.0`: Pure vector search\n- `alpha=0.0`: Pure text search\n- `alpha=0.7` (default): 70% vector, 30% text"
494+
"source": [
495+
"### Adjusting the Alpha Parameter\n",
496+
"\n",
497+
"The `alpha` parameter controls the weight between vector and text search:\n",
498+
"- `alpha=1.0`: Pure vector search\n",
499+
"- `alpha=0.0`: Pure text search\n",
500+
"- `alpha=0.7` (default): 70% vector, 30% text"
501+
]
447502
},
448503
{
449504
"cell_type": "code",
450505
"execution_count": null,
451506
"id": "hybrid-query-alpha-code",
452507
"metadata": {},
453508
"outputs": [],
454-
"source": "// More emphasis on vector search (alpha=0.9)\nAggregateHybridQuery vectorHeavyQuery = AggregateHybridQuery.builder()\n .text(\"comfortable\")\n .textFieldName(\"brief_description\")\n .vector(new float[]{0.15f, 0.25f, 0.15f})\n .vectorFieldName(\"text_embedding\")\n .alpha(0.9f) // 90% vector, 10% text\n .returnFields(Arrays.asList(\"product_id\", \"brief_description\"))\n .numResults(3)\n .build();\n\nSystem.out.println(\"Results with alpha=0.9 (vector-heavy):\");\nList<Map<String, Object>> vectorHeavyResults = index.query(vectorHeavyQuery);\nfor (Map<String, Object> result : vectorHeavyResults) {\n System.out.println(\" \" + result.get(\"brief_description\"));\n}"
509+
"source": [
510+
"// More emphasis on vector search (alpha=0.9)\n",
511+
"AggregateHybridQuery vectorHeavyQuery = AggregateHybridQuery.builder()\n",
512+
" .text(\"comfortable\")\n",
513+
" .textFieldName(\"brief_description\")\n",
514+
" .vector(new float[]{0.15f, 0.25f, 0.15f})\n",
515+
" .vectorFieldName(\"text_embedding\")\n",
516+
" .alpha(0.9f) // 90% vector, 10% text\n",
517+
" .returnFields(Arrays.asList(\"product_id\", \"brief_description\"))\n",
518+
" .numResults(3)\n",
519+
" .build();\n",
520+
"\n",
521+
"System.out.println(\"Results with alpha=0.9 (vector-heavy):\");\n",
522+
"List<Map<String, Object>> vectorHeavyResults = index.query(vectorHeavyQuery);\n",
523+
"for (Map<String, Object> result : vectorHeavyResults) {\n",
524+
" System.out.println(\" \" + result.get(\"brief_description\"));\n",
525+
"}"
526+
]
455527
},
456528
{
457529
"cell_type": "markdown",
458530
"id": "hybrid-query-filter",
459531
"metadata": {},
460-
"source": "### Aggregate Hybrid Query with Filters\n\nYou can also combine hybrid search with filters:"
532+
"source": [
533+
"### Aggregate Hybrid Query with Filters\n",
534+
"\n",
535+
"You can also combine hybrid search with filters:"
536+
]
461537
},
462538
{
463539
"cell_type": "code",
464540
"execution_count": null,
465541
"id": "hybrid-query-filter-code",
466542
"metadata": {},
467543
"outputs": [],
468-
"source": "// Hybrid search with a price filter\nAggregateHybridQuery filteredHybridQuery = AggregateHybridQuery.builder()\n .text(\"professional equipment\")\n .textFieldName(\"brief_description\")\n .vector(new float[]{0.9f, 0.1f, 0.05f})\n .vectorFieldName(\"text_embedding\")\n .filterExpression(Filter.numeric(\"price\").gt(100))\n .returnFields(Arrays.asList(\"product_id\", \"brief_description\", \"category\", \"price\"))\n .numResults(5)\n .build();\n\nList<Map<String, Object>> filteredHybridResults = index.query(filteredHybridQuery);\nSystem.out.println(\"Filtered hybrid results (price > $100):\");\nfor (Map<String, Object> result : filteredHybridResults) {\n System.out.println(\" \" + result.get(\"brief_description\") + \" - $\" + result.get(\"price\"));\n}"
544+
"source": [
545+
"// Hybrid search with a price filter\n",
546+
"AggregateHybridQuery filteredHybridQuery = AggregateHybridQuery.builder()\n",
547+
" .text(\"professional equipment\")\n",
548+
" .textFieldName(\"brief_description\")\n",
549+
" .vector(new float[]{0.9f, 0.1f, 0.05f})\n",
550+
" .vectorFieldName(\"text_embedding\")\n",
551+
" .filterExpression(Filter.numeric(\"price\").gt(100))\n",
552+
" .returnFields(Arrays.asList(\"product_id\", \"brief_description\", \"category\", \"price\"))\n",
553+
" .numResults(5)\n",
554+
" .build();\n",
555+
"\n",
556+
"List<Map<String, Object>> filteredHybridResults = index.query(filteredHybridQuery);\n",
557+
"System.out.println(\"Filtered hybrid results (price > $100):\");\n",
558+
"for (Map<String, Object> result : filteredHybridResults) {\n",
559+
" System.out.println(\" \" + result.get(\"brief_description\") + \" - $\" + result.get(\"price\"));\n",
560+
"}"
561+
]
469562
},
470563
{
471564
"cell_type": "markdown",
472565
"id": "hybrid-query-scorers",
473566
"metadata": {},
474-
"source": "### Using Different Text Scorers\n\nAggregateHybridQuery supports the same text scoring algorithms as TextQuery:"
567+
"source": [
568+
"### Using Different Text Scorers\n",
569+
"\n",
570+
"AggregateHybridQuery supports the same text scoring algorithms as TextQuery:"
571+
]
475572
},
476573
{
477574
"cell_type": "code",
478575
"execution_count": null,
479576
"id": "hybrid-query-scorer-code",
480577
"metadata": {},
481578
"outputs": [],
482-
"source": "// Aggregate Hybrid query with TFIDF scorer\nAggregateHybridQuery hybridTfidf = AggregateHybridQuery.builder()\n .text(\"shoes support\")\n .textFieldName(\"brief_description\")\n .vector(new float[]{0.12f, 0.18f, 0.12f})\n .vectorFieldName(\"text_embedding\")\n .textScorer(\"TFIDF\")\n .returnFields(Arrays.asList(\"product_id\", \"brief_description\"))\n .numResults(3)\n .build();\n\nList<Map<String, Object>> hybridTfidfResults = index.query(hybridTfidf);\nSystem.out.println(\"Hybrid query with TFIDF scorer:\");\nfor (Map<String, Object> result : hybridTfidfResults) {\n System.out.println(\" \" + result.get(\"brief_description\"));\n}"
579+
"source": [
580+
"// Aggregate Hybrid query with TFIDF scorer\n",
581+
"AggregateHybridQuery hybridTfidf = AggregateHybridQuery.builder()\n",
582+
" .text(\"shoes support\")\n",
583+
" .textFieldName(\"brief_description\")\n",
584+
" .vector(new float[]{0.12f, 0.18f, 0.12f})\n",
585+
" .vectorFieldName(\"text_embedding\")\n",
586+
" .textScorer(\"TFIDF\")\n",
587+
" .returnFields(Arrays.asList(\"product_id\", \"brief_description\"))\n",
588+
" .numResults(3)\n",
589+
" .build();\n",
590+
"\n",
591+
"List<Map<String, Object>> hybridTfidfResults = index.query(hybridTfidf);\n",
592+
"System.out.println(\"Hybrid query with TFIDF scorer:\");\n",
593+
"for (Map<String, Object> result : hybridTfidfResults) {\n",
594+
" System.out.println(\" \" + result.get(\"brief_description\"));\n",
595+
"}"
596+
]
483597
},
484598
{
485599
"cell_type": "markdown",
486600
"id": "multi-vector-intro",
487601
"metadata": {},
488-
"source": "## 3. MultiVectorQuery: Multi-Vector Search\n\nThe `MultiVectorQuery` allows you to search over multiple vector fields simultaneously. This is useful when you have different types of embeddings (e.g., text and image embeddings) and want to find results that match across multiple modalities.\n\nThe final score is calculated as a weighted combination:\n\n```\ncombined_score = w_1 * score_1 + w_2 * score_2 + w_3 * score_3 + ...\n```"
602+
"source": [
603+
"## 3. MultiVectorQuery: Multi-Vector Search\n",
604+
"\n",
605+
"The `MultiVectorQuery` allows you to search over multiple vector fields simultaneously. This is useful when you have different types of embeddings (e.g., text and image embeddings) and want to find results that match across multiple modalities.\n",
606+
"\n",
607+
"The final score is calculated as a weighted combination:\n",
608+
"\n",
609+
"```\n",
610+
"combined_score = w_1 * score_1 + w_2 * score_2 + w_3 * score_3 + ...\n",
611+
"```"
612+
]
489613
},
490614
{
491615
"cell_type": "markdown",
@@ -688,7 +812,29 @@
688812
"cell_type": "markdown",
689813
"id": "best-practices",
690814
"metadata": {},
691-
"source": "## Best Practices\n\n### When to Use Each Query Type:\n\n1. **`TextQuery`**:\n - When you need precise keyword matching\n - For traditional search engine functionality\n - When text relevance scoring is important\n - Example: Product search, document retrieval\n\n2. **`AggregateHybridQuery`**:\n - When you want to combine keyword and semantic search\n - For improved search quality over pure text or vector search\n - When you have both text and vector representations of your data\n - Example: E-commerce search, content recommendation\n\n3. **`MultiVectorQuery`**:\n - When you have multiple types of embeddings (text, image, audio, etc.)\n - For multi-modal search applications\n - When you want to balance multiple semantic signals\n - Example: Image-text search, cross-modal retrieval"
815+
"source": [
816+
"## Best Practices\n",
817+
"\n",
818+
"### When to Use Each Query Type:\n",
819+
"\n",
820+
"1. **`TextQuery`**:\n",
821+
" - When you need precise keyword matching\n",
822+
" - For traditional search engine functionality\n",
823+
" - When text relevance scoring is important\n",
824+
" - Example: Product search, document retrieval\n",
825+
"\n",
826+
"2. **`AggregateHybridQuery`**:\n",
827+
" - When you want to combine keyword and semantic search\n",
828+
" - For improved search quality over pure text or vector search\n",
829+
" - When you have both text and vector representations of your data\n",
830+
" - Example: E-commerce search, content recommendation\n",
831+
"\n",
832+
"3. **`MultiVectorQuery`**:\n",
833+
" - When you have multiple types of embeddings (text, image, audio, etc.)\n",
834+
" - For multi-modal search applications\n",
835+
" - When you want to balance multiple semantic signals\n",
836+
" - Example: Image-text search, cross-modal retrieval"
837+
]
692838
},
693839
{
694840
"cell_type": "markdown",
@@ -728,4 +874,4 @@
728874
},
729875
"nbformat": 4,
730876
"nbformat_minor": 5
731-
}
877+
}

0 commit comments

Comments
 (0)