diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 4791c401..326f9fc7 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -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[] @@ -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[] diff --git a/modules/ROOT/pages/errors/gql-errors/22NCG.adoc b/modules/ROOT/pages/errors/gql-errors/22NCG.adoc new file mode 100644 index 00000000..6f2796de --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22NCG.adoc @@ -0,0 +1,33 @@ += 22NCG + +== Status description +error: data exception - wrong index type. Expected the index `{ <> }` to be a `{ <>1 }` index but was a `{ <>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::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/22ND3.adoc b/modules/ROOT/pages/errors/gql-errors/22ND3.adoc new file mode 100644 index 00000000..3fc8df22 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22ND3.adoc @@ -0,0 +1,66 @@ += 22ND3 + +== Status description +error: data exception - wrong property for vector search with filters. The property `{ <> }` is not an additional property for vector search with filters on the vector index `{ <> }` . + +== 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::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I73.adoc b/modules/ROOT/pages/errors/gql-errors/42I73.adoc new file mode 100644 index 00000000..47246ca3 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I73.adoc @@ -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 `{ <> }` 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::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I74.adoc b/modules/ROOT/pages/errors/gql-errors/42I74.adoc new file mode 100644 index 00000000..899eac9b --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I74.adoc @@ -0,0 +1,45 @@ += 42I74 + +== Status description +error: syntax error or access rule violation - wrong variable for vector search with filters. The variable `{ <>1 }` in a vector search filter property predicate must be the same as the search clause binding 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::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I75.adoc b/modules/ROOT/pages/errors/gql-errors/42I75.adoc new file mode 100644 index 00000000..0708b5a5 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I75.adoc @@ -0,0 +1,72 @@ += 42I75 + +== Status description +error: syntax error or access rule violation - self-referencing in vector search. The expression `{ <> }` in the search clause may not depend on the search clause binding 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::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/index.adoc b/modules/ROOT/pages/errors/gql-errors/index.adoc index 4822131e..0a143b65 100644 --- a/modules/ROOT/pages/errors/gql-errors/index.adoc +++ b/modules/ROOT/pages/errors/gql-errors/index.adoc @@ -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 `{ <> }` operation. +=== xref:errors/gql-errors/22NCG.adoc[22NCG] + +Status description:: error: data exception - wrong index type. Expected the index `{ <> }` to be a `{ <>1 }` index but was a `{ <>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: `'{ <> }'` is not allowed for roles that are granted to an `AUTH RULE`. @@ -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: `'{ <> }'` 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 `{ <> }` is not an additional property for vector search with filters on the vector index `{ <> }` . + [[invalid-transaction-state]] == Invalid transaction state @@ -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 `{ <> }` 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 `{ <>1 }` in a vector search filter property predicate must be the same as the search clause binding 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 `{ <> }` in the search clause may not depend on the search clause binding 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 `{ <> }` `{ <> }` (`{ <>1 }` bytes) exceeded limit of `{ <>2 }` bytes.