apoc.search.nodeAll

This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime. For more information, see the Cypher Manual → Parallel runtime.

Details

Syntax

apoc.search.nodeAll(labelPropertyMap, operator, value) :: (node)

Description

Returns all the NODE values found after a parallel search over multiple indexes.

Input arguments

Name

Type

Description

labelPropertyMap

ANY

A map that pairs labels with lists of properties. This can also be represented as a JSON string.

operator

STRING

The search operator, can be one of: ["exact", "starts with", "ends with", "contains", "<", ">", "=", "<>", "⇐", ">=", "=~"].

value

STRING

The search value.

Return arguments

Name

Type

Description

node

NODE

The found node.

Example

Given this dataset:

CREATE (:Person {name: 'Alice Johnson', born: 1990})
CREATE (:Person {name: 'Bob Smith', born: 1985})
CREATE (:Movie {title: 'Alice in Wonderland', released: 2010, tagline: 'Follow Alice down the rabbit hole'})
CREATE (:Movie {title: 'The Matrix', released: 1999, tagline: 'Welcome to the Real World'})

The following query searches Person.name and Movie.title and Movie.tagline in parallel, returning a result for every property match:

CALL
  apoc.search.nodeAll(
    {Person: 'name', Movie: ['title', 'tagline']},
    'contains',
    'Alice'
  )
  YIELD node
RETURN labels(node) AS labels, coalesce(node.name, node.title) AS value
Results
labels value

["Person"]

"Alice Johnson"

["Movie"]

"Alice in Wonderland"

["Movie"]

"Alice in Wonderland"

The Movie node appears twice because it matches on both title and tagline. Use apoc.search.node to deduplicate and return each matching node only once.