---
sidebar_class_name: node-only
---

import CodeBlock from "@theme/CodeBlock";

# Redis

[Redis](https://redis.io/) is a fast open source, in-memory data store.
As part of the [Redis Stack](https://redis.io/docs/stack/get-started/), [RediSearch](https://redis.io/docs/stack/search/) is the module that enables vector similarity semantic search, as well as many other types of searching.

:::tip Compatibility
Only available on Node.js.
:::

LangChain.js accepts [node-redis](https://github.com/redis/node-redis) as the client for Redis vectorstore.

## Setup

1. Run Redis with Docker on your computer following [the docs](https://redis.io/docs/stack/get-started/install/docker/#redisredis-stack)
2. Install the node-redis JS client

```bash npm2yarn
npm install -S redis
```

## Index docs

import IndexExample from "@examples/indexes/vector_stores/redis/redis.ts";

<CodeBlock language="typescript">{IndexExample}</CodeBlock>

## Query docs

import QueryExample from "@examples/indexes/vector_stores/redis/redis_query.ts";

<CodeBlock language="typescript">{QueryExample}</CodeBlock>
