Skip to content

Commit

Permalink
Merge pull request #610 from wjohnsto/master
Browse files Browse the repository at this point in the history
added vector solution in sidebar
  • Loading branch information
PrasanKumar93 authored Sep 1, 2023
2 parents 5f3ebc2 + 722a08a commit c4470dc
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import org.springframework.data.redis.core.RedisTemplate;

Notice that while the template types are generic, it is up to the serializers/deserializers to convert the given Objects to-and-from binary data correctly.

We could also configure the Redis host and port programmatically by defining a `@Bean` annotated method that returns a `RedisConnectionFactory` (either a `JedisConnectionFactory` or `LettuceConnectionFactory`) and use the `setHostName` and `setPort` methods.
We could also configure the Redis host and port programmatically by defining a `@Bean` annotated method that returns a `RedisConnectionFactory` (either a `JedisConnectionFactory`) and use the `setHostName` and `setPort` methods.

But since Spring Data Redis can configure the beans using a properties file (either Java Properties or YAML), we will use the `applications.properties` file instead.

Expand Down
6 changes: 6 additions & 0 deletions docs/explore/redisinsight/streams/index-streams.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ slug: /explore/redisinsight/streams
authors: [ajeet]
---

:::warning LETTUCE

This tutorial uses Lettuce, which is an unsupported Redis library. For production applications, we recommend using [<u>**Jedis**</u>](https://github.com/redis/jedis)

:::

import Authors from '@theme/Authors';

<Authors frontMatter={frontMatter} />
Expand Down
6 changes: 0 additions & 6 deletions docs/howtos/antipatterns/index-antipatterns.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ With large databases running on a single shard/Redis instance, there are chances

Redis Enterprise recommends to shard if you have more than 25 GB of data and a high number of operations. Another aspect is if you have above 25,000 operations per second, then sharding can improve performance. With less number of operations/second, it can handle up to 50GB of data too.

### 2. One connection per request

Opening a connection each operation requires a lot of overhead to build up and tear down the TCP connection. As a developer, you might sometimes create a connection, run a command, and close the connection. While opening and closing connections per command will technically work, it’s far from optimal and needlessly cuts into the performance of Redis as a whole. Hence, it is recommended to use a connection pool (Jedis) or a Redis client that has a reactive design (Lettuce).

Using the OSS Cluster API, the connection to the nodes are maintained by the client as needed, so you’ll have multiple connections open to different nodes at any given time. With Redis Enterprise, the connection is actually to a proxy, which takes care of the complexity of connections at the cluster level.

### Examples #1 - redis-py

Let us look at the redis-py that uses a connection pool to manage connections to a Redis server. By default, each Redis instance you create will in turn create its own connection pool. You can override this behavior and use an existing connection pool by passing an already created connection pool instance to the connection_pool argument of the Redis class. You may choose to do this in order to implement client side sharding or have fine-grain control of how connections are managed.
Expand Down
15 changes: 15 additions & 0 deletions docs/howtos/solutions/index-solutions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,18 @@ Learn how to easily build, test and deploy code for common microservice and cach
</div>

</div>

## Vectors

<div class="row">

<div class="col">
<RedisCard
title="Vector Similarity Search"
description="Getting Started with Vector Search Using Redis in NodeJS"
page="/howtos/solutions/vector/getting-started-vector"
/>
</div>
<div class="col">
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ In a more complex scenario, like natural language processing (NLP), words or ent

## What is a vector database?

A vector database is a database that's optimized for storing and searching vectors. It's a specialized database that's designed to store and search vectors efficiently. Vector databases are often used to power vector search applications, such as recommendation systems, image search, and textual content retrieval. Vector databases are also referred to as vector stores, vector indexes, or vector search engines. Vector databases use vector similarity algorithms to search for vectors that are similar to a given query vector.
A vector database is a specialized system optimized for storing and searching vectors. Designed explicitly for efficiency, these databases play a crucial role in powering vector search applications, including recommendation systems, image search, and textual content retrieval. Often referred to as vector stores, vector indexes, or vector search engines, these databases employ vector similarity algorithms to identify vectors that closely match a given query vector.

:::tip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Another detail to check is if the client stores the hash slot map locally. If it

Examples of clients that support Redis cluster:

- Java: Jedis, Lettuce
- Java: Jedis
- .NET: StackExchange.Redis
- Go: Radix, go-redis/redis
- Node.js: node-redis, ioredis
Expand Down
11 changes: 9 additions & 2 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,22 @@ module.exports = {
items: [
'howtos/solutions/real-time-inventory/available-to-promise/index-rti-available-to-promise',
'howtos/solutions/real-time-inventory/local-inventory-search/index-rti-local-inventory-search',
]
],
},
{
type: 'category',
label: 'Mobile Banking',
items: [
'howtos/solutions/mobile-banking/session-management/index-mb-session-management',
'howtos/solutions/mobile-banking/account-dashboard/index-mb-account-dashboard',
]
],
},
{
type: 'category',
label: 'Vectors',
items: [
'howtos/solutions/vector/getting-started-vector/index-getting-started-vector',
],
},
],
},
Expand Down

0 comments on commit c4470dc

Please sign in to comment.