You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<1> xref:functions/aggregating.adoc#functions-collect[Collect] all returned `Movie` nodes into a `LIST<NODE>`.
192
192
<2> `batchSize` defines the number of nodes in `moviesList` to be processed at once.
193
193
Because vector embeddings can be very large, a larger batch size may require significantly more memory on the Neo4j server.
194
194
Too large a batch size may also exceed the provider's threshold.
195
195
<3> Process `Movie` nodes in increments of `batchSize`.
196
+
The end range `total-1` is due to `range` being inclusive on both ends.
196
197
<4> A xref:subqueries/subqueries-in-transactions.adoc[`CALL` subquery] executes a separate transaction for each batch.
197
198
Note that this `CALL` subquery uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause].
198
199
<5> `batch` is a list of strings, each being the concatenation of `title` and `plot` of one movie.
199
200
<6> The procedure sets `vector` as value for the property named `embedding` for the node at position `batchStart + index` in the `moviesList`.
200
201
<7> Set to `1` the amount of batches to be processed at once.
202
+
For more information on concurrency in transactions, see xref:subqueries/subqueries-in-transactions.adoc#concurrent-transactions[`CALL` subqueries -> Concurrent transactions]).
201
203
202
204
[NOTE]
203
205
This example may not scale to larger datasets, as `collect(m)` requires the whole result set to be loaded in memory.
0 commit comments