apoc.search.node
Procedure APOC Core
Do a parallel search over multiple indexes returning nodes. usage apoc.search.node( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the DISTINCT Nodes found in the different searches.
Signature
apoc.search.node(LabelPropertyMap :: ANY?, operator :: STRING?, value :: STRING?) :: (node :: NODE?)
Input parameters
Name | Type | Default |
---|---|---|
LabelPropertyMap |
ANY? |
null |
operator |
STRING? |
null |
value |
STRING? |
null |
Usage Examples
The examples in this section are based on the following sample graph:
MERGE (shambar:Recipe {name: "Shambar"})
MERGE (cornedBeefPie:Recipe {name: "Corned beef pie"})
MERGE (beef:Ingredient {name: "beef"})
MERGE (pork:Ingredient {name: "pork"})
MERGE (chickpea:Ingredient {name: "chickpea"})
MERGE (potatoes:Ingredient {name: "potatoes"})
MERGE (shambar)-[:CONTAINS_INGREDIENT]->(beef)
MERGE (shambar)-[:CONTAINS_INGREDIENT]->(pork)
MERGE (shambar)-[:CONTAINS_INGREDIENT]->(chickpea)
MERGE (cornedBeefPie)-[:CONTAINS_INGREDIENT]->(beef)
MERGE (cornedBeefPie)-[:CONTAINS_INGREDIENT]->(potatoes);
CALL apoc.search.node(
{Recipe: "name", Ingredient: "name"},
"CONTAINS",
"beef"
);
node |
---|
(:Recipe {name: "Corned beef pie"}) |
(:Ingredient {name: "beef"}) |