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
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/call.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ RETURN count(*) AS results
`YIELD` can be used to filter for specific results.
This requires knowing the names of the arguments within a procedure's signature, which can either be found in the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/[Operations Manual -> Procedures] or in the `signature` column returned by a `SHOW PROCEDURES` command (see example below).

.Find the argument names of `db.propertyKeys`
.Find the argument names of `db.propertyKeys()`
[source, cypher]
----
SHOW PROCEDURES YIELD name, signature
Expand Down
16 changes: 8 additions & 8 deletions modules/ROOT/pages/genai-integrations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ This function sends one API request every time it is called, which may result in
If you want to generate many embeddings at once, use xref:genai-integrations.adoc#multiple-embeddings[].


Use the `db.create.setNodeVectorProperty` procedure to store an embedding to a node property.
Use the `db.create.setNodeVectorProperty()` procedure to store an embedding to a node property.

.Signature for `db.create.setNodeVectorProperty` label:procedure[]
.Signature for `db.create.setNodeVectorProperty()` label:procedure[]
[source,syntax]
----
db.create.setNodeVectorProperty(node :: NODE, key :: STRING, vector :: ANY)
----

Use the `db.create.setRelationshipVectorProperty` procedure to store an embedding to a relationship property.
Use the `db.create.setRelationshipVectorProperty()` procedure to store an embedding to a relationship property.

.Signature for `db.create.setRelationshipVectorProperty` label:procedure[]
.Signature for `db.create.setRelationshipVectorProperty()` label:procedure[]
[source,syntax]
----
db.create.setRelationshipVectorProperty(relationship :: RELATIONSHIP, key :: STRING, vector :: ANY)
Expand Down Expand Up @@ -122,14 +122,14 @@ This result only shows the first 4 of the 1536 numbers in the embedding.
[[multiple-embeddings]]
== Generating a batch of embeddings and store them

Use the `genai.vector.encodeBatch` procedure to generate many vector embeddings with a single API request.
Use the `genai.vector.encodeBatch()` procedure to generate many vector embeddings with a single API request.
This procedure takes a list of resources as an input, and returns the same number of result rows, instead of a single one.

[NOTE]
This procedure attempts to generate embeddings for all supplied resources in a single API request.
Therefore, it is recommended to see the respective provider's documentation for details on, for example, the maximum number of embeddings that can be generated per request.

.Signature for `genai.vector.encodeBatch` label:procedure[]
.Signature for `genai.vector.encodeBatch()` label:procedure[]
[source,syntax]
----
genai.vector.encodeBatch(resources :: LIST<STRING>, provider :: STRING, configuration :: MAP = {}) :: (index :: INTEGER, resource :: STRING, vector :: LIST<FLOAT>)
Expand Down Expand Up @@ -166,7 +166,7 @@ CALL db.create.setNodeVectorProperty(moviesList[index], 'embedding', vector) //

<1> xref:functions/aggregating.adoc#functions-collect[Collect] all 20 `Movie` nodes into a `LIST<NODE>`.
<2> Use a xref:expressions/list-expressions.adoc#list-comprehension[list comprehension] (`[]`) to extract the `title` and `plot` properties of the movies in `moviesList` into a new `LIST<STRING>`.
<3> `db.create.setNodeVectorProperty` is run for each `vector` returned by `genai.vector.encodeBatch`, and stores that vector as a property named `embedding` on the corresponding node.
<3> `db.create.setNodeVectorProperty()` is run for each `vector` returned by `genai.vector.encodeBatch()`, and stores that vector as a property named `embedding` on the corresponding node.
====

.Create embeddings from a large number of properties and store them
Expand Down Expand Up @@ -208,7 +208,7 @@ For an alternative method more suitable to processing large amounts of data, see
== GenAI providers

The following GenAI providers are supported for generating vector embeddings.
Each provider has its own configuration map that can be passed to `genai.vector.encode` or `genai.vector.encodeBatch`.
Each provider has its own configuration map that can be passed to `genai.vector.encode()` or `genai.vector.encodeBatch()`.

[[vertex-ai]]
=== Vertex AI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ OPTIONS {

<1> The `fulltext.analyzer` setting can be used to configure an index-specific analyzer.
In this case, it is set to the `english` analyzer.
The possible values for the `fulltext.analyzer` setting can be listed with the `db.index.fulltext.listAvailableAnalyzers` procedure.
The possible values for the `fulltext.analyzer` setting can be listed with the `db.index.fulltext.listAvailableAnalyzers()` procedure.
<2> The `fulltext.eventually_consistent` setting, if set to `true`, will put the index in an _eventually consistent_ update mode.
This means that updates will be applied in a background thread "as soon as possible", instead of during a transaction commit, which is true for other indexes.

Expand All @@ -134,13 +134,13 @@ For more information on how to configure full-text indexes, refer to the link:{n
== Query full-text indexes

Unlike xref:indexes/search-performance-indexes/managing-indexes.adoc[search-performance indexes], full-text indexes are not automatically used by the xref:planning-and-tuning/execution-plans.adoc[Cypher query planner].
To query a full-text index, use either the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_fulltext_queryNodes[`db.index.fulltext.queryNodes`] or the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_fulltext_queryRelationships[`db.index.fulltext.queryRelationships`] procedure.
To query a full-text index, use either the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_fulltext_queryNodes[`db.index.fulltext.queryNodes()`] or the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_fulltext_queryRelationships[`db.index.fulltext.queryRelationships()`] procedure.

[NOTE]
An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created.
To check the `state` of a full-text index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW FULLTEXT INDEXES`.

This query uses the `db.index.fulltext.queryNodes` to look for `nils` in the previously created full-text index `namesAndTeams`:
This query uses the `db.index.fulltext.queryNodes()` procedure to look for `nils` in the previously created full-text index `namesAndTeams`:

.Query a full-text index for a node property
[source, cypher]
Expand Down Expand Up @@ -172,7 +172,7 @@ This is possible because both the property values that are indexed, and the quer

The `score` results are always returned in _descending score order_, where the best matching result entry is put first.

This query uses the `db.index.fulltext.queryRelationships` to query the previously created `communications` full-text index for any `message` containing "meeting":
This query uses the `db.index.fulltext.queryRelationships()` procedure to query the previously created `communications` full-text index for any `message` containing "meeting":

.Query a full-text index for a relationship property
[source, cypher]
Expand Down Expand Up @@ -362,19 +362,19 @@ The procedures for full-text indexes are listed in the table below:
| Usage | Procedure/Command | Description

| Eventually consistent indexes.
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_awaitEventuallyConsistentIndexRefresh[`db.index.fulltext.awaitEventuallyConsistentIndexRefresh`]
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_awaitEventuallyConsistentIndexRefresh[`db.index.fulltext.awaitEventuallyConsistentIndexRefresh()`]
| Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes.

| List available analyzers.
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_listAvailableAnalyzers[`db.index.fulltext.listAvailableAnalyzers`]
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_listAvailableAnalyzers[`db.index.fulltext.listAvailableAnalyzers()`]
| List the available analyzers that the full-text indexes can be configured with.

| Use full-text node index.
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_queryNodes[`db.index.fulltext.queryNodes`]
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_queryNodes[`db.index.fulltext.queryNodes()`]
| Query the given full-text index. Returns the matching nodes and their Lucene query score, ordered by score.

| Use full-text relationship index.
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_queryRelationships[`db.index.fulltext.queryRelationships`]
| https://neo4j.com/docs/operations-manual/current/procedures/#procedure_db_index_fulltext_queryRelationships[`db.index.fulltext.queryRelationships()`]
| Query the given full-text index. Returns the matching relationships and their Lucene query score, ordered by score.

|===
Expand Down
18 changes: 9 additions & 9 deletions modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ Default value::: `100`
[[query-vector-index]]
== Query vector indexes

To query a node vector index, use the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryNodes[`db.index.vector.queryNodes`] procedure.
To query a node vector index, use the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryNodes[`db.index.vector.queryNodes()`] procedure.

[NOTE]
An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created.
To check the `state` of a vector index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW VECTOR INDEXES`.

.Signature for `db.index.vector.queryNodes`
.Signature for `db.index.vector.queryNodes()`
[source,syntax]
----
db.index.vector.queryNodes(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: ANY) :: (node :: NODE, score :: FLOAT)
Expand Down Expand Up @@ -228,13 +228,13 @@ If the query vector itself is not wanted, adding the predicate `WHERE score < 1`

To query a relationship vector index, use the link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryRelationships[`db.index.vector.queryRelationships`] procedure.

.Signature for `db.index.vector.queryRelationships`
.Signature for `db.index.vector.queryRelationships()`
[source,syntax]
----
db.index.vector.queryRelationships(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: ANY) :: (relationship :: RELATIONSHIP, score :: FLOAT)
----

`db.index.vector.queryRelationships` has the same argument descriptions as `db.index.vector.queryNodes`.
`db.index.vector.queryRelationships()` has the same argument descriptions as `db.index.vector.queryNodes()`.

[TIP]
Use xref:functions/vector.adoc[] to compute the similarity score between two specific vector pairs without using a vector index.
Expand Down Expand Up @@ -471,21 +471,21 @@ image::euclidean-similarity-equation.svg["The Euclidean of vector v and vector u
| Usage | Procedure | Description

| Use node vector index.
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryNodes[`db.index.vector.queryNodes`]
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryNodes[`db.index.vector.queryNodes()`]
| Query the given node vector index.
Returns the requested number of approximate nearest neighbor nodes and their similarity score, ordered by score.

| Use relationship vector index.
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryRelationships[`db.index.vector.queryRelationships`]
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_queryRelationships[`db.index.vector.queryRelationships()`]
| Query the given relationship vector index.
Returns the requested number of approximate nearest neighbor relationships and their similarity score, ordered by score.

| Set node vector property.
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_create_setNodeVectorProperty[`db.create.setNodeVectorProperty`]
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_create_setNodeVectorProperty[`db.create.setNodeVectorProperty()`]
| Update a given node property with the given vector in a more space-efficient way than directly using xref:clauses/set.adoc#set-set-a-property[`SET`].

| Set relationship vector property.
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_create_setRelationshipVectorProperty[`db.create.setRelationshipVectorProperty`]
| link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_create_setRelationshipVectorProperty[`db.create.setRelationshipVectorProperty()`]
| Update a given relationship property with the given vector in a more space-efficient way than directly using xref:clauses/set.adoc#set-set-a-property[`SET`].

|===
Expand Down Expand Up @@ -514,7 +514,7 @@ The following table lists the issues and, if fixed, the version in which they we
|===
| Known issues | Fixed in

| The creation of a vector index using the legacy procedure link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_createNodeIndex[`db.index.vector.createNodeIndex`] may fail with an error in Neo4j 5.18 and later if the database was last written to with a version prior to Neo4j 5.11, and the legacy procedure is the first write operation used on the newer version.
| The creation of a vector index using the legacy procedure link:{neo4j-docs-base-uri}/operations-manual/current/procedures/#procedure_db_index_vector_createNodeIndex[`db.index.vector.createNodeIndex()`] may fail with an error in Neo4j 5.18 and later if the database was last written to with a version prior to Neo4j 5.11, and the legacy procedure is the first write operation used on the newer version.
In Neo4j 5.20, the error was clarified.
[TIP]
--
Expand Down
10 changes: 5 additions & 5 deletions modules/ROOT/pages/indexes/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ ON EACH “[“ r.propertyName[, ...] “]”

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).
* `fulltext.analyzer` - specifies what analyzer to use (the `db.index.fulltext.listAvailableAnalyzers()` procedure lists what analyzers are available).
* `fulltext.eventually_consistent` - specifies whether a full-text index is eventually consistent.
If set to `true`, it will ensure that updates from committing transactions are applied in a background thread.

Expand Down Expand Up @@ -250,13 +250,13 @@ To use them, specific procedures must be called. Their signatures can be seen be
[[query-full-text-index]]
=== Full-text indexes

.Query full-text index on nodes: db.index.fulltext.queryNodes
.Query full-text index on nodes: db.index.fulltext.queryNodes()
[source,syntax]
----
CALL db.index.fulltext.queryNodes(indexName :: STRING, queryString :: STRING, options = {} :: MAP)
----

.Query full-text index on relationships: db.index.fulltext.queryRelationships
.Query full-text index on relationships: db.index.fulltext.queryRelationships()
[source, syntax]
----
CALL db.index.fulltext.queryRelationships(indexName :: STRING, queryString :: STRING, options = {} :: MAP)
Expand All @@ -275,13 +275,13 @@ For more information, see xref:indexes/semantic-indexes/full-text-indexes.adoc#q
[[query-vector-index]]
=== Vector indexes

.Query vector-text index on nodes: db.index.vector.queryNodes
.Query vector-text index on nodes: db.index.vector.queryNodes()
[source,syntax]
----
CALL db.index.vector.queryNodes(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: LIST<INTEGER | FLOAT>)
----

.Query vector-text index on relationships: db.index.vector.queryRelationships
.Query vector-text index on relationships: db.index.vector.queryRelationships()
[source,syntax]
----
CALL db.index.vector.queryRelationships(indexName :: STRING, numberOfNearestNeighbours :: INTEGER, query :: LIST<INTEGER | FLOAT>)
Expand Down
Loading