Skip to content

Commit 807f1d4

Browse files
authored
DEV: add TCEs to query > vector page (#675)
1 parent 67410a2 commit 807f1d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/develop/interact/search-and-query/query/vector-search.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ You can read more about the `PARAMS` argument in the [FT.SEARCH]({{< baseurl >}}
4646

4747
The following example shows you how to query for three bikes based on their description embeddings, and by using the field alias `vector`. The result is returned in ascending order based on the distance. You can see that the query only returns the fields `__vector_score` and `description`. The field `__vector_score` is present by default. Because you can have multiple vector fields in your schema, the vector score field name depends on the name of the vector field. If you change the field name `@vector` to `@foo`, the score field name changes to `__foo_score`.
4848

49-
```
49+
{{< clients-example query_vector vector1 >}}
5050
FT.SEARCH idx:bikes_vss "(*)=>[KNN 3 @vector $query_vector]" PARAMS 2 "query_vector" "Z\xf8\x15:\xf23\xa1\xbfZ\x1dI>\r\xca9..." SORTBY "__vector_score" ASC RETURN 2 "__vector_score" "description" DIALECT 2
51-
```
51+
{{< /clients-example >}}
5252

5353
<!-- Python query>
5454
query = (
@@ -60,7 +60,7 @@ query = (
6060
</!-->
6161

6262
{{% alert title="Note" color="warning" %}}
63-
The binary value of the query vector is significantly shortened in this example.
63+
The binary value of the query vector is significantly shortened in the CLI example above.
6464
{{% /alert %}}
6565

6666

@@ -93,9 +93,9 @@ By default, [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) returns only the
9393

9494
The example below shows a radius query that returns the description and the distance within a radius of `0.5`. The result is sorted by the distance.
9595

96-
```
96+
{{< clients-example query_vector vector2 >}}
9797
FT.SEARCH idx:bikes_vss "@vector:[VECTOR_RANGE 0.5 $query_vector]=>{$YIELD_DISTANCE_AS: vector_dist}" PARAMS 2 "query_vector" "Z\xf8\x15:\xf23\xa1\xbfZ\x1dI>\r\xca9..." SORTBY vector_dist ASC RETURN 2 vector_dist description DIALECT 2
98-
```
98+
{{< /clients-example >}}
9999

100100
<!-- Python query>
101101
query = (

0 commit comments

Comments
 (0)