Skip to content

Commit

Permalink
DOC-3135: 'vector similarity search' > 'vector search' (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdougherty authored Dec 1, 2023
1 parent e97e1d5 commit 3163b2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/stack/clients/om-clients/stack-spring.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ The `Person` class (`com.redis.om.skeleton.models.Person`) is annotated with `@D

The fields `id`, `firstName`, `lastName`, `age`, `homeLoc`, `address`, and `skills` are all annotated
with `@Indexed` (`com.redis.om.spring.annotations.Indexed`). On entities annotated with `@Document` Redis OM Spring will scan the fields and add an appropriate search index field to the schema for the entity. For example, for the `Person` class
an index named `com.redis.om.skeleton.models.PersonIdx` will be created on application startup. In the index schema, a search field will be added for each `@Indexed` annotated property. RediSearch, the underlying search engine powering searches, supports Text (full-text searches), Tag (exact-match searches), Numeric (range queries), Geo (geographic range queries), and Vector (vector similarity queries) fields. For `@Indexed` fields, the appropriate search field (Tag, Numeric, or Geo) is selected based on the property's data type.
an index named `com.redis.om.skeleton.models.PersonIdx` will be created on application startup. In the index schema, a search field will be added for each `@Indexed` annotated property. RediSearch, the underlying search engine powering searches, supports Text (full-text searches), Tag (exact-match searches), Numeric (range queries), Geo (geographic range queries), and Vector (vector queries) fields. For `@Indexed` fields, the appropriate search field (Tag, Numeric, or Geo) is selected based on the property's data type.

Fields marked as `@Searchable` (`com.redis.om.spring.annotations.Searchable`) such as `personalStatement` in `Person` are reflected as Full-Text search fields in the search index schema.

Expand Down
10 changes: 5 additions & 5 deletions docs/stack/get-started/vector-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This quick start guide helps you to:
1. Understand what a vector database is
2. Set a vector database up
3. Create vector embeddings and store vectors
4. Query data and perform a vector similarity search
4. Query data and perform a vector search


## Understand vector databases
Expand All @@ -26,7 +26,7 @@ You can use Redis Stack as a vector database. It allows you to:

* Store vectors and the associated metadata within hashes or [JSON](/docs/data-types/json) documents
* Retrieve vectors
* Perform vector similarity searches
* Perform vector searches

## Set a vector database up

Expand Down Expand Up @@ -142,7 +142,7 @@ In the example above, the array was shortened considerably for the sake of reada

### 1. Create an index with a vector field

You must create an index to query based on vector metadata or perform vector similarity searches. Use the [FT.CREATE](https://redis.io/commands/ft.create/) command:
You must create an index to query based on vector metadata or perform vector searches. Use the [FT.CREATE](https://redis.io/commands/ft.create/) command:

{{< clients-example search_vss create_index >}}
FT.CREATE idx:bikes_vss ON JSON
Expand Down Expand Up @@ -176,7 +176,7 @@ FT_INFO idx:bikes_vss

## Search and query

This quick start guide focuses on the vector similarity search aspect. Still, you can learn more about how to query based on vector metadata in the [document database quick start guide](/docs/get-started/document-database/).
This quick start guide focuses on the vector search aspect. Still, you can learn more about how to query based on vector metadata in the [document database quick start guide](/docs/get-started/document-database/).

### 1. Embed your prompts

Expand Down Expand Up @@ -207,7 +207,7 @@ query = (
```

{{% alert title="Note" color="warning" %}}
To utilize a vector similarity query with the `FT.SEARCH` command, you must specify DIALECT 2 or greater.
To utilize a vector query with the `FT.SEARCH` command, you must specify DIALECT 2 or greater.
{{% /alert %}}

You must pass the vectorized query as `$query_vector` as a byte array. The following code shows an example of creating a Python NumPy array from a vectorized query prompt (`encoded_query`) as a single precision floating point array and converting it into a compact, byte-level representation that can be passed as a parameter to the query:
Expand Down

0 comments on commit 3163b2c

Please sign in to comment.