Skip to content
Merged
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
5 changes: 5 additions & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@
**** xref:errors/gql-errors/22NCD.adoc[]
**** xref:errors/gql-errors/22NCE.adoc[]
**** xref:errors/gql-errors/22NCF.adoc[]
**** xref:errors/gql-errors/22NCG.adoc[]
**** xref:errors/gql-errors/22ND1.adoc[]
**** xref:errors/gql-errors/22ND2.adoc[]
**** xref:errors/gql-errors/22ND3.adoc[]
*** xref:errors/gql-errors/index.adoc#invalid-transaction-state[Invalid transaction state]
**** xref:errors/gql-errors/25G02.adoc[]
**** xref:errors/gql-errors/25N01.adoc[]
Expand Down Expand Up @@ -293,6 +295,9 @@
**** xref:errors/gql-errors/42I71.adoc[]
**** xref:errors/gql-errors/42I72.adoc[]
**** xref:errors/gql-errors/42I76.adoc[]
**** xref:errors/gql-errors/42I73.adoc[]
**** xref:errors/gql-errors/42I74.adoc[]
**** xref:errors/gql-errors/42I75.adoc[]
**** xref:errors/gql-errors/42N00.adoc[]
**** xref:errors/gql-errors/42N01.adoc[]
**** xref:errors/gql-errors/42N02.adoc[]
Expand Down
33 changes: 33 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22NCG.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
= 22NCG

== Status description
error: data exception - wrong index type. Expected the index `{ <<idx>> }` to be a `{ <<idxType>>1 }` index but was a `{ <<idxType>>2 }` index.

== Example scenario
For example, assuming that you have a range index called `rangeIdx`, when trying to use it in a `SEARCH` clause:

[source,cypher]
----
CYPHER 25
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX rangeIdx
FOR [1, 2, 3]
LIMIT 5
)
RETURN movie.title AS title
----

You will receive an error with GQLSTATUS 22NCG and status description:

[source]
----
error: data exception - wrong index type. Expected the index `rangeIdx` to be a vector index but was a range index.
----

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
66 changes: 66 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22ND3.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
= 22ND3

== Status description
error: data exception - wrong property for vector search with filters. The property `{ <<propKey>> }` is not an additional property for vector search with filters on the vector index `{ <<idx>> }` .

== Example scenario
For example, assuming that you have a vector index created by the following command:

[source,cypher]
----
CYPHER 25
CREATE VECTOR INDEX moviePlots
FOR (m:Movie) ON m.embedding
WITH [m.rating]
----

When using a property key other than `rating` in the `WHERE` clause property predicate in a `SEARCH` clause:

[source,cypher]
----
CYPHER 25
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR [1, 2, 3]
WHERE movie.votes > 1000
LIMIT 5
)
RETURN movie.title AS title
----

You will receive an error with GQLSTATUS 22ND3 and status description:

[source]
----
error: data exception - wrong property for vector search with filters. The property `votes` is not an additional property for vector search with filters on the vector index 'moviePlots'.
----

== Possible solution

If you want to use the property `votes` for vector search with filters, it must be added as an additional property to the vector index.
For example:

. Drop the index you want to add the property to:
+
[source,cypher]
----
DROP INDEX moviePlots
----

. Recreate the index by adding the new property to the index:
+
[source,cypher]
----
CYPHER 25
CREATE VECTOR INDEX moviePlots
FOR (m:Movie) ON m.embedding
WITH [m.rating, m.votes]
----

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
78 changes: 78 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42I73.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
= 42I73

== Status description
error: syntax error or access rule violation - invalid predicate for vector search with filters. The vector search filter predicate `{ <<expr>> }` must consist of one or more property predicates joined by `AND`, and the combined property predicates for each property must specify either an exact value (e.g. `x.prop = 1`), a half-bounded range (e.g. `x.prop >= 1`), or a bounded range (e.g. `x.prop > 1 AND x.prop < 100`).

== Example scenarios
For example, assuming that you have a vector index created by the following command:

[source,cypher]
----
CYPHER 25
CREATE VECTOR INDEX moviePlots
FOR (m:Movie) ON m.embedding
WITH [m.rating]
----


.Using `NOT` inside the `WHERE` subclause predicate in a `SEARCH` clause
=====
When trying to use `NOT` inside the `WHERE` subclause predicate in a `SEARCH` clause:

[source,cypher]
----
CYPHER 25
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR [1, 2, 3]
WHERE NOT movie.rating = 8
LIMIT 5
)
RETURN movie.title AS title, movie.rating AS rating
----

You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I73 and status description:

[source]
----
error: syntax error or access rule violation - invalid predicate for vector search with filters. The vector search filter predicate `NOT movie.rating = 8` must consist of one or more property predicates joined by AND, and the combined property predicates for each property must specify either an exact value (e.g. `x.prop = 1`), a half-bounded range (e.g. `x.prop >= 1`), or a bounded range (e.g. `x.prop > 1 AND x.prop < 100`).
----
=====

.Using multiple half-bounded ranges on the same property inside the `WHERE` subclause predicate in a `SEARCH` clause
=====
When trying to use multiple half-bounded ranges on the same property inside the `WHERE` subclause predicate in a `SEARCH` clause:

[source,cypher]
----
CYPHER 25
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR [1, 2, 3]
WHERE movie.rating > 6 AND movie.rating > 8
LIMIT 5
)
RETURN movie.title AS title, movie.rating AS rating
----

You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I73 and status description:

[source]
----
error: syntax error or access rule violation - invalid predicate for vector search with filters. The vector search filter predicate `movie.rating > 6 AND movie.rating > 8` must consist of one or more property predicates joined by AND, and the combined property predicates for each property must specify either an exact value (e.g. `x.prop = 1`), a half-bounded range (e.g. `x.prop >= 1`), or a bounded range (e.g. `x.prop > 1 AND x.prop < 100`).
----
=====

== Possible solution
You can rewrite the predicates to comply with the vector search filter rules.
For example, the predicate `NOT movie.rating < 7` can be rewritten to `movie.rating >= 7`, while the predicate `movie.rating > 6 AND movie.rating > 8` can be rewritten to `movie.rating > 8`.
However, it is not always possible to rewrite the predicates.
For the complete list of limitations, see link:https://neo4j.com/docs/cypher-manual/current/clauses/search/#limitations[Cypher Manual -> Limitations of the SEARCH clause].
ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
45 changes: 45 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42I74.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
= 42I74

== Status description
error: syntax error or access rule violation - wrong variable for vector search with filters. The variable `{ <<variable>>1 }` in a vector search filter property predicate must be the same as the search clause binding variable `{ <<variable>>2 }`.

== Example scenario
For example, assuming that you have a vector index created by the following command:

[source,cypher]
----
CYPHER 25
CREATE VECTOR INDEX moviePlots
FOR (m:Movie) ON m.embedding
WITH [m.rating]
----

When trying to use a variable other than `movie` inside the `WHERE` subclause predicate in a `SEARCH` clause in the following query:

[source,cypher]
----
CYPHER 25
MATCH (m:Movie {title:'Matrix, The'})
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR m.embedding
WHERE m.rating >= 8
LIMIT 5
)
RETURN movie.title AS title, movie.rating AS rating
----

You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I74 and status description:

[source]
----
error: syntax error or access rule violation - wrong variable for vector search with filters. The variable `m` in a vector search filter property predicate must be the same as the search clause binding variable `movie`.
----

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
72 changes: 72 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42I75.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
= 42I75

== Status description
error: syntax error or access rule violation - self-referencing in vector search. The expression `{ <<expr>> }` in the search clause may not depend on the search clause binding variable `{ <<variable>> }`.

== Example scenarios
For example, assuming that you have a vector index created by the following command:

[source,cypher]
----
CYPHER 25
CREATE VECTOR INDEX moviePlots
FOR (m:Movie) ON m.embedding
WITH [m.rating]
----

.Using the search binding variable in the `FOR` subclause of a vector search
=====
When trying to use the search binding variable `movie` in the `FOR` subclause in the following query:

[source,cypher]
----
CYPHER 25
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR movie.embedding
LIMIT 5
)
RETURN movie.title AS title, movie.rating AS rating
----

You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I75 and status description:

[source]
----
error: syntax error or access rule violation - self-referencing in vector search. The expression `movie.embedding` in the search clause may not depend on the search clause binding variable `movie`.
----
=====

.Using the search binding variable in the `WHERE` subclause of a `SEARCH` clause
=====
When trying to use the search binding variable `movie` in both the left-hand and right-hand side of the predicate in the `WHERE` subclause in the following query:

[source,cypher]
----
CYPHER 25
MATCH (m:Movie {title:'Matrix, The'})
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR m.embedding
WHERE movie.rating = movie.year
LIMIT 5
)
RETURN movie.title AS title, movie.rating AS rating
----

You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I75 and status description:

[source]
----
error: syntax error or access rule violation - self-referencing in vector search. The expression `movie.year` in the search clause may not depend on the search clause binding variable `movie`.
----
=====

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
20 changes: 20 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,10 @@ Status description:: error: data exception - node element type in use. The node

Status description:: error: data exception - graph type constraint not supported. Graph type constraint definitions are not supported in the `{ <<graphTypeOperation>> }` operation.

=== xref:errors/gql-errors/22NCG.adoc[22NCG]

Status description:: error: data exception - wrong index type. Expected the index `{ <<idx>> }` to be a `{ <<idxType>>1 }` index but was a `{ <<idxType>>2 }` index.

=== xref:errors/gql-errors/22ND1.adoc[22ND1]

Status description:: error: data exception - operation not allowed for roles that are granted to an `AUTH RULE`. Invalid input: `'{ <<query>> }'` is not allowed for roles that are granted to an `AUTH RULE`.
Expand All @@ -726,6 +730,10 @@ Status description:: error: data exception - operation not allowed for roles tha

Status description:: error: data exception - operation not allowed for roles with `DENY` privileges. Invalid input: `'{ <<query>> }'` is not allowed for roles with `DENY` privileges.

=== xref:errors/gql-errors/22ND3.adoc[22ND3]

Status description:: error: data exception - wrong property for vector search with filters. The property `{ <<propKey>> }` is not an additional property for vector search with filters on the vector index `{ <<idx>> }` .


[[invalid-transaction-state]]
== Invalid transaction state
Expand Down Expand Up @@ -1183,6 +1191,18 @@ Status description:: error: syntax error or access rule violation - search claus

Status description:: error: syntax error or access rule violation - search clause with too complex pattern. In order to have a search clause, a `MATCH` statement can only have a single node or relationship pattern and no selectors.

=== xref:errors/gql-errors/42I73.adoc[42I73]

Status description:: error: syntax error or access rule violation - invalid predicate for vector search with filters. The vector search filter predicate `{ <<expr>> }` must consist of one or more property predicates joined by `AND`, and the combined property predicates for each property must specify either an exact value (e.g. `x.prop = 1`), a half-bounded range (e.g. `x.prop >= 1`), or a bounded range (e.g. `x.prop > 1 AND x.prop < 100`).

=== xref:errors/gql-errors/42I74.adoc[42I74]

Status description:: error: syntax error or access rule violation - wrong variable for vector search with filters. The variable `{ <<variable>>1 }` in a vector search filter property predicate must be the same as the search clause binding variable `{ <<variable>>2 }`.

=== xref:errors/gql-errors/42I75.adoc[42I75]

Status description:: error: syntax error or access rule violation - self-referencing in vector search. The expression `{ <<expr>> }` in the search clause may not depend on the search clause binding variable `{ <<variable>> }`.

=== xref:errors/gql-errors/42I76.adoc[42I76]

Status description:: error: syntax error or access rule violation - index or constraint value too long. The provided index or constraint `{ <<item>> }` `{ <<input>> }` (`{ <<bytes>>1 }` bytes) exceeded limit of `{ <<bytes>>2 }` bytes.
Expand Down