Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions site/content/3.12/aql/functions/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,19 @@ be found depends on the data as well as the search effort (see the `nProbe` opti
{{< info >}}
- If there is more than one suitable vector index over the same attribute, it is
undefined which one is selected.
- You cannot have any `FILTER` operation between `FOR` and `LIMIT` for
pre-filtering.

- In v3.12.4 and v3.12.5, you cannot have any `FILTER` operation between `FOR`
and `LIMIT` for pre-filtering. From v3.12.6 onward, you can add `FILTER`
operations between `FOR` and `SORT` that are then applied during the lookup in
the vector index. Example:

```aql
FOR doc IN coll
FILTER doc.val > 3
SORT APPROX_NEAR_COSINE(doc.vector, @q) DESC
LIMIT 5
RETURN doc
```
{{< /info >}}

### APPROX_NEAR_COSINE()
Expand Down
16 changes: 16 additions & 0 deletions site/content/3.12/release-notes/version-3.12/whats-new-in-3-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,22 @@ utilizing vector indexes in queries.
Furthermore, a new error code `ERROR_QUERY_VECTOR_SEARCH_NOT_APPLIED` (1554)
has been added.

---

<small>Introduced in: v3.12.6</small>

Vector indexes now support filtering. You can add `FILTER` operations between
`FOR` and `SORT` that are then applied during the lookup in the vector index.
Example:

```aql
FOR doc IN coll
FILTER doc.val > 3
SORT APPROX_NEAR_COSINE(doc.vector, @q) DESC
LIMIT 5
RETURN doc
```

## Server options

### Effective and available startup options
Expand Down
15 changes: 13 additions & 2 deletions site/content/3.13/aql/functions/vector.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,19 @@ be found depends on the data as well as the search effort (see the `nProbe` opti
{{< info >}}
- If there is more than one suitable vector index over the same attribute, it is
undefined which one is selected.
- You cannot have any `FILTER` operation between `FOR` and `LIMIT` for
pre-filtering.

- In v3.12.4 and v3.12.5, you cannot have any `FILTER` operation between `FOR`
and `LIMIT` for pre-filtering. From v3.12.6 onward, you can add `FILTER`
operations between `FOR` and `SORT` that are then applied during the lookup in
the vector index. Example:

```aql
FOR doc IN coll
FILTER doc.val > 3
SORT APPROX_NEAR_COSINE(doc.vector, @q) DESC
LIMIT 5
RETURN doc
```
{{< /info >}}

### APPROX_NEAR_COSINE()
Expand Down
16 changes: 16 additions & 0 deletions site/content/3.13/release-notes/version-3.12/whats-new-in-3-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,22 @@ utilizing vector indexes in queries.
Furthermore, a new error code `ERROR_QUERY_VECTOR_SEARCH_NOT_APPLIED` (1554)
has been added.

---

<small>Introduced in: v3.12.6</small>

Vector indexes now support filtering. You can add `FILTER` operations between
`FOR` and `SORT` that are then applied during the lookup in the vector index.
Example:

```aql
FOR doc IN coll
FILTER doc.val > 3
SORT APPROX_NEAR_COSINE(doc.vector, @q) DESC
LIMIT 5
RETURN doc
```

## Server options

### Effective and available startup options
Expand Down