Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of index-provider option #1096

Merged
merged 6 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
16 changes: 0 additions & 16 deletions modules/ROOT/pages/constraints/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ As of Neo4j 5.17, an informational notification is returned in case nothing happ
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE n.propertyName IS [NODE] UNIQUE
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a composite node property uniqueness constraint on multiple properties
Expand All @@ -44,7 +43,6 @@ REQUIRE n.propertyName IS [NODE] UNIQUE
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE (n.propertyName_1, ..., n.propertyName_n) IS [NODE] UNIQUE
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a relationship property uniqueness constraint on a single property label:new[Introduced in 5.7]
Expand All @@ -53,7 +51,6 @@ REQUIRE (n.propertyName_1, ..., n.propertyName_n) IS [NODE] UNIQUE
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE r.propertyName IS [REL[ATIONSHIP]] UNIQUE
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a composite relationship property uniqueness constraint on multiple properties label:new[Introduced in 5.7]
Expand All @@ -62,7 +59,6 @@ REQUIRE r.propertyName IS [REL[ATIONSHIP]] UNIQUE
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE (r.propertyName_1, ..., r.propertyName_n) IS [REL[ATIONSHIP]] UNIQUE
[OPTIONS "{" option: value[, ...] "}"]
----

For examples on how to create property uniqueness constraints, see xref:constraints/managing-constraints.adoc#create-property-uniqueness-constraints[Create, show, and drop constraints -> Create property uniqueness constraint].
Expand All @@ -78,7 +74,6 @@ Property uniqueness constraints are xref:constraints/managing-constraints.adoc#c
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE n.propertyName IS NOT NULL
[OPTIONS "{" "}"]
----

.Syntax for creating a relationship property existence constraint
Expand All @@ -87,11 +82,8 @@ REQUIRE n.propertyName IS NOT NULL
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE r.propertyName IS NOT NULL
[OPTIONS "{" "}"]
----

There are no supported `OPTIONS` values for property existence constraints, but an empty options map is allowed for consistency.

For examples on how to create property existence constraints, see xref:constraints/managing-constraints.adoc#create-property-existence-constraints[Create, show, and drop constraints -> Create property existence constraints].

[role=label--enterprise-edition label--new-5.9]
Expand All @@ -104,7 +96,6 @@ For examples on how to create property existence constraints, see xref:constrai
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE n.propertyName {[IS] :: | IS TYPED} <TYPE>
[OPTIONS "{" "}"]
----

.Syntax for creating a relationship property type constraint
Expand All @@ -113,7 +104,6 @@ REQUIRE n.propertyName {[IS] :: | IS TYPED} <TYPE>
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE r.propertyName {[IS] :: | IS TYPED} <TYPE>
[OPTIONS "{" "}"]
----

The three variations of the expression, `IS ::`, `::`, and `IS TYPED` are syntactic synonyms for the same expression.
Expand Down Expand Up @@ -147,8 +137,6 @@ Where `<TYPE>` is one of the following property types:

Allowed syntax variations of these types are listed in xref::values-and-types/property-structural-constructed.adoc#types-synonyms[Types and their synonyms].

There are no supported `OPTIONS` values for property type constraints, but an empty options map is allowed for consistency.

For examples on how to create property type constraints, see xref:constraints/managing-constraints.adoc#create-property-type-constraint[Create, show, and drop constraints -> Create property type constraints].


Expand All @@ -162,7 +150,6 @@ For examples on how to create property type constraints, see xref:constraints/m
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE n.propertyName IS [NODE] KEY
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a composite node key constraint on multiple properties
Expand All @@ -171,7 +158,6 @@ REQUIRE n.propertyName IS [NODE] KEY
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR (n:LabelName)
REQUIRE (n.propertyName_1, ..., n.propertyName_n) IS [NODE] KEY
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a relationship key constraint on a single property label:new[Introduced in 5.7]
Expand All @@ -180,7 +166,6 @@ REQUIRE (n.propertyName_1, ..., n.propertyName_n) IS [NODE] KEY
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE r.propertyName IS [REL[ATIONSHIP]] KEY
[OPTIONS "{" option: value[, ...] "}"]
----

.Syntax for creating a composite relationship key constraint on multiple properties label:new[Introduced in 5.7]
Expand All @@ -189,7 +174,6 @@ REQUIRE r.propertyName IS [REL[ATIONSHIP]] KEY
CREATE CONSTRAINT [constraint_name] [IF NOT EXISTS]
FOR ()-"["r:RELATIONSHIP_TYPE"]"-()
REQUIRE (r.propertyName_1, ..., r.propertyName_n) IS [REL[ATIONSHIP]] KEY
[OPTIONS "{" option: value[, ...] "}"]
----

For examples on how to create key constraints, see xref:constraints/managing-constraints.adoc#create-key-constraints[Create, show, and drop constraints -> Create key constraints].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ Replacement syntax for deprecated and removed features are also indicated.
| Feature
| Details

a|
label:functionality[]
label:deprecated[]
[source, cypher, role="noheader"]
----
CREATE VECTOR INDEX vector_index IF NOT EXISTS
FOR (n:Label)
ON n.embedding
OPTIONS {
indexProvider: 'vector-1.0'
}
----

| Specifying an index provider in the `OPTIONS` map when creating an index is deprecated.
This also means that the xref:indexes/semantic-indexes/vector-indexes.adoc[vector index] index provider, `vector-1.0`, is deprecated.
Use the default index provider, `vector-2.0`, instead.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

a|
label:functionality[]
label:deprecated[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ If `IF NOT EXISTS` is appended to the command, no error is thrown and nothing ha
It may still throw an error if conflicting constraints exist, such as constraints with the same name or schema and backing index type.
As of Neo4j 5.17, an informational notification is instead returned showing the existing index which blocks the creation.

Configuration settings can be specified using the `OPTIONS` clause.

Index configuration settings can be specified using the `OPTIONS` clause.
However, not all indexes have available configuration settings.
In those cases, nothing needs to be specified and the `OPTIONS` map should be omitted from the query.

Expand Down Expand Up @@ -215,7 +214,7 @@ As of Neo4j 5.17, an informational notification is instead returned.
Creating a text index can be done with the `CREATE TEXT INDEX` command.
Note that the index name must be unique.

Text indexes have no supported index configuration and, as of Neo4j 5.1, they have two index providers available, `text-2.0` (default) and `text-1.0` (deprecated).
Text indexes have no supported index configuration.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

[[text-indexes-supported-predicates]]
[discrete]
Expand Down
16 changes: 6 additions & 10 deletions modules/ROOT/pages/indexes/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ As of Neo4j 5.17, an informational notification is instead returned showing the
The index name must be unique among both indexes and constraints.
A random name will be assigned if no name is explicitly given when an index is created.

Configuration settings can be specified using the `OPTIONS` clause.
Index configuration settings can be specified using the `OPTIONS` clause.
However, not all indexes have available configuration settings.
In those cases, nothing needs to be specified and the `OPTIONS` map should be omitted from the query.

Expand All @@ -38,7 +38,7 @@ Creating an index requires link:{neo4j-docs-base-uri}/operations-manual/{page-ve
=== Range indexes

Range indexes have no supported index configuration.
The `OPTIONS` map has been omitted from the syntax below.
The `OPTIONS` map has, therefore, been omitted from the syntax below.

.Create a range index for a node label, either on a single property or composite
[source,syntax]
Expand Down Expand Up @@ -67,13 +67,15 @@ For more information, see xref:indexes/search-performance-indexes/managing-index
[[create-text-index]]
=== Text indexes

Text indexes have no supported index configuration.
The `OPTIONS` map has, therefore, been omitted from the syntax below.

.Create a text index for a node label on a single property
[source,syntax]
----
CREATE TEXT INDEX [index_name] [IF NOT EXISTS]
FOR (n:LabelName)
ON (n.propertyName_1)
[OPTIONS “{“ option: value[, …] “}”]
----

.Create a text index for a relationship type on a single property
Expand All @@ -82,11 +84,8 @@ ON (n.propertyName_1)
CREATE TEXT INDEX [index_name] [IF NOT EXISTS]
FOR ()-”[“r:TYPE_NAME”]”-()
ON (r.propertyName_1)
[OPTIONS “{“ option: value[, …] “}”]
----

Text indexes have no supported index configuration and, as of Neo4j 5.1, they have two index providers available, `text-2.0` (default) and `text-1.0` (deprecated).

[NOTE]
It is not possible to create composite text indexes on multiple properties.

Expand Down Expand Up @@ -133,7 +132,7 @@ For more information, see xref:indexes/search-performance-indexes/managing-index
=== Token lookup indexes

Token lookup indexes have no supported index configuration.
The `OPTIONS` map has been omitted from the syntax below.
The `OPTIONS` map has, therefore, been omitted from the syntax below.

.Create a node label lookup index
[source,syntax]
Expand Down Expand Up @@ -205,9 +204,6 @@ ON (r.propertyName)
[OPTIONS “{“ option: value[, …] “}”]
----

As of Neo4j 5.18, vector indexes have two vector index providers available, `vector-2.0` (default) and `vector-1.0` (deprecated).
For more information, see xref:indexes/semantic-indexes/vector-indexes.adoc#vector-index-providers[Vector index providers for compatibility].

For a full list of all vector index settings, see xref:indexes/semantic-indexes/vector-indexes.adoc#configuration-settings[Vector index configuration settings].
Note that the `OPTIONS` clause was mandatory prior to Neo4j 5.23 because it was necessary to configure the `vector.dimensions` and `vector.similarity_function` settings when creating a vector index.

Expand Down