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 2 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
55 changes: 0 additions & 55 deletions modules/ROOT/pages/constraints/managing-constraints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ Constraint already exists: Constraint( id=7, name='book_title_year', type='UNIQU
=== Constraints and indexes

* xref:constraints/managing-constraints.adoc#constraints-and-backing-indexes[]
* xref:constraints/managing-constraints.adoc#create-constraint-with-index-provider[]
* xref:constraints/managing-constraints.adoc#constraint-failures-and-indexes[]

[[constraints-and-backing-indexes]]
Expand Down Expand Up @@ -994,60 +993,6 @@ SHOW INDEXES WHERE owningConstraint IS NOT NULL
[NOTE]
Property existence and property type constraints are not backed by indexes.

[[create-constraint-with-index-provider]]
==== Creating constraints with an index provider

Because property uniqueness and key constraints have backing indexes, an index provider can be provided when creating these constraints using the `OPTIONS` clause and the `indexProvider` option.

The only valid value for the index provider is:

* `range-1.0` label:default[]


.Create a node key constraint with a specified index provider
======

.Create a constraint requiring `Actor` nodes to have a unique `surname` property as a node key, specifying `range-1.0` as index provider
[source, cypher]
----
CREATE CONSTRAINT constraint_with_provider
FOR (actor:Actor) REQUIRE actor.surname IS NODE KEY
OPTIONS {
indexProvider: 'range-1.0'
}
----

.Result
[source, queryresult]
----
Added 1 constraint.
----

======

.Create a relationship property uniqueness constraint with a specified index provider
======

.Create a constraint requiring `SEQUEL_OF` relationships to have a unique combination of `order`, `seriesTitle`, and `number` properties, specifying `range-1.0` as index provider
[source, cypher]
----
CREATE CONSTRAINT rel_constraint_with_options
FOR ()-[sequel:SEQUEL_OF]-() REQUIRE (sequel.order, sequel.seriesTitle, sequel.number) IS UNIQUE
OPTIONS {
indexProvider: 'range-1.0'
}
----

.Result
[source, queryresult]
----
Added 1 constraint.
----

======

There are no valid index configuration values for the constraint-backing range indexes.

[[constraint-failures-and-indexes]]
==== Constraint failures and indexes

Expand Down
8 changes: 0 additions & 8 deletions modules/ROOT/pages/constraints/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ It may still throw an error if conflicting data, indexes, or constraints exist.
Examples of this are nodes with missing properties, indexes with the same name, or constraints with same schema but a different conflicting constraint type.
As of Neo4j 5.17, an informational notification is returned in case nothing happens showing the existing constraint which blocks the creation.

For constraints that are backed by an index, the index provider for the backing index can be specified using the `OPTIONS` clause.
Only one valid value exists for the index provider, `range-1.0`, which is the default value.
There is no supported index configuration for range indexes.

[[create-property-uniqueness-constraints]]
=== Create property uniqueness constraints

Expand Down Expand Up @@ -69,8 +65,6 @@ REQUIRE (r.propertyName_1, ..., r.propertyName_n) IS [REL[ATIONSHIP]] UNIQUE
[OPTIONS "{" option: value[, ...] "}"]
----

An index provider can be specified using the `OPTIONS` clause.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

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].
Property uniqueness constraints are xref:constraints/managing-constraints.adoc#constraints-and-indexes[index-backed].

Expand Down Expand Up @@ -198,8 +192,6 @@ REQUIRE (r.propertyName_1, ..., r.propertyName_n) IS [REL[ATIONSHIP]] KEY
[OPTIONS "{" option: value[, ...] "}"]
----

An index provider can be specified using the `OPTIONS` clause.

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].
Key constraints are xref:constraints/managing-constraints.adoc#constraints-and-indexes[index-backed].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ 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.

Index providers and configuration settings can be specified using the `OPTIONS` clause.footnote:[Index providers are essentially different implementations of the same index type.
Different providers are only available for xref:indexes/search-performance-indexes/managing-indexes.adoc#create-a-text-index-specifying-the-index-provider[text indexes].]
Hunterness marked this conversation as resolved.
Show resolved Hide resolved
Configuration settings can be specified using the `OPTIONS` clause.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

However, not all indexes have available configuration settings or more than one provider.
However, not all indexes have available configuration settings.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved
In those cases, nothing needs to be specified and the `OPTIONS` map should be omitted from the query.

[TIP]
Expand All @@ -50,7 +49,7 @@ A newly created index is not immediately available but is created in the backgro
Creating a range index can be done with the `CREATE INDEX` command.
Note that the index name must be unique.

Range indexes have only one index provider available, `range-1.0`, and no supported index configuration.
Range indexes have no supported index configuration.

[[range-indexes-supported-predicates]]
[discrete]
Expand Down Expand Up @@ -294,7 +293,6 @@ Text indexes are only used for exact query matches. To perform approximate match
* xref:indexes/search-performance-indexes/managing-indexes.adoc#create-a-relationship-text-index[]
* xref:indexes/search-performance-indexes/managing-indexes.adoc#create-a-text-index-by-param[]
* xref:indexes/search-performance-indexes/managing-indexes.adoc#create-a-text-index-only-if-it-does-not-already-exist[]
* xref:indexes/search-performance-indexes/managing-indexes.adoc#create-a-text-index-specifying-the-index-provider[]

[discrete]
[[create-a-node-text-index]]
Expand Down Expand Up @@ -366,30 +364,13 @@ As of Neo4j 5.17, an informational notification is instead returned.
`TEXT INDEX node_text_index_nickname FOR (e:Person) ON (e.nickname)` already exists.
----

[discrete]
[[create-a-text-index-specifying-the-index-provider]]
===== Create a text index specifying the index provider

To create a text index with a specific index provider, the `OPTIONS` clause is used.
The valid values for the index provider are `text-2.0` and `text-1.0` (deprecated).
The default provider is `text-2.0`.

.Creating a text index with index provider
[source, cypher]
----
CREATE TEXT INDEX text_index_with_indexprovider FOR ()-[r:TYPE]-() ON (r.prop1)
OPTIONS {indexProvider: 'text-2.0'}
----

There is no supported index configuration for text indexes.

[[create-point-index]]
=== Create a point index

Creating a point index can be done with the `CREATE POINT INDEX` command.
Note that the index name must be unique.

Point indexes have supported index configuration, but only one index provider available, `point-1.0`.
Point indexes have supported index configuration.

[discrete]
[[point-indexes-supported-predicates]]
Expand Down Expand Up @@ -554,7 +535,7 @@ Only one node label and one relationship type lookup index can exist at the same
If a token lookup index has been deleted, it can be recreated with the `CREATE LOOKUP INDEX` command.
Note that the index name must be unique.

Token lookup indexes have only one index provider available, `token-lookup-1.0`, and no supported index configuration.
Token lookup indexes have no supported index configuration.

[discrete]
[[lookup-index-supported-predicates]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ A vector index allows you to retrieve a neighborhood of nodes or relationships b

A vector index is a single-label, single-property index for nodes or a single-relationship-type, single-property index for relationships.
It can be used to index nodes or relationships by `LIST<INTEGER | FLOAT>` properties valid to the dimensions and vector similarity function of the index.
Note that the available vector index providers (`vector-2.0` (default) and `vector-1.0`) support different index schemas, property value types, and vector dimensions.
Note that the available vector index providers (`vector-2.0` (default) and `vector-1.0` (deprecated)) support different index schemas, property value types, and vector dimensions.
For more information, see xref:indexes/semantic-indexes/vector-indexes.adoc#vector-index-providers[].

A vector index is created by using the `CREATE VECTOR INDEX` command.
Expand Down Expand Up @@ -350,9 +350,8 @@ DROP INDEX moviePlots
[[vector-index-providers]]
== Vector index providers for compatibility

As of Neo4j 5.18, the default and preferred vector index provider is `vector-2.0`.
As of Neo4j 5.18, the default index provider is `vector-2.0`.
Previously created `vector-1.0` indexes will continue to function.
New indexes can still be created with the `vector-1.0` provider if it is specified in the `OPTIONS` map.

.Learn more about vector index provider differences
[%collapsible]
Expand Down
16 changes: 7 additions & 9 deletions modules/ROOT/pages/indexes/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ 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.

Index providers and configuration settings can be specified using the `OPTIONS` clause.
However, not all indexes have available configuration settings or multiple providers.
Configuration settings can be specified using the `OPTIONS` clause.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved
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.

[TIP]
Expand All @@ -37,8 +37,8 @@ Creating an index requires link:{neo4j-docs-base-uri}/operations-manual/{page-ve
[[create-range-index]]
=== Range indexes

Range indexes have only one index provider, `range-1.0`, and no supported index configuration.
Since the index provider will be assigned by default, the `OPTIONS` map has been omitted from the syntax below.
Range indexes have no supported index configuration.
The `OPTIONS` map has been omitted from the syntax below.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

.Create a range index for a node label, either on a single property or composite
[source,syntax]
Expand Down Expand Up @@ -113,7 +113,6 @@ ON (r.propertyName_1)
[OPTIONS “{“ option: value[, …] “}”]
----

Point indexes have only one index provider available, `point-1.0`.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved
The following settings can be specified for point indexes:

* `spatial.cartesian.min`
Expand All @@ -133,8 +132,8 @@ For more information, see xref:indexes/search-performance-indexes/managing-index
[[create-lookup-index]]
=== Token lookup indexes

Token lookup indexes have only one index provider, `token-lookup-1.0`, and no supported index configuration.
Since the index provider will be assigned by default, the `OPTIONS` map has been omitted from the syntax below.
Token lookup indexes have no supported index configuration.
The `OPTIONS` map has been omitted from the syntax below.
Hunterness marked this conversation as resolved.
Show resolved Hide resolved

.Create a node label lookup index
[source,syntax]
Expand Down Expand Up @@ -177,7 +176,6 @@ ON EACH “[“ r.propertyName[, ...] “]”
[OPTIONS “{“ option: value[, …] “}”]
----

Full-text indexes have only one index provider available, `fulltext-1.0`.
The following settings can be specified for full-text indexes:

* `fulltext.analyzer` - specifies what analyzer to use (the `db.index.fulltext.listAvailableAnalyzers` procedure lists what analyzers are available).
Expand Down Expand Up @@ -207,7 +205,7 @@ 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`.
As of Neo4j 5.18, vector indexes have two vector index providers available, `vector-2.0` (default) and `vector-1.0` (deprecated).
Hunterness marked this conversation as resolved.
Show resolved Hide resolved
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].
Expand Down