ParallelNodeSearch { @Procedure("apoc.search.nodeAll") @Description("Do a parallel search over multiple indexes returning nodes. usage apoc.search.nodeAll( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the Nodes found in the different searches.") public Stream<NodeResult> multiSearchNodeAll(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final String value) throws Exception { return createWorkersFromValidInput(labelProperties, operator, value).flatMap(QueryWorker::queryForNodeId).map(nodeId -> new NodeResult(tx.getNodeById(nodeId))); }  @Procedure("apoc.search.nodeAllReduced") @Description("Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched property. apoc.search.nodeShortAll( map of label and properties which will be searched upon, operator: EXACT / CONTAINS / STARTS WITH | ENDS WITH / = / <> / < / > ..., value ). All 'hits' are returned.") Stream<NodeReducedResult> multiSearchAll(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final Object value); @Procedure("apoc.search.nodeReduced") @Description("Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.nodeReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.") Stream<NodeReducedResult> multiSearch(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final String value); @Procedure("apoc.search.multiSearchReduced") @Description("Do a parallel search over multiple indexes returning a reduced representation of the nodes found: node id, labels and the searched properties. apoc.search.multiSearchReduced( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ). Multiple search results for the same node are merged into one record.") Stream<NodeReducedResult> multiSearchOld(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final String value); @Procedure("apoc.search.nodeAll") @Description("Do a parallel search over multiple indexes returning nodes. usage apoc.search.nodeAll( map of label and properties which will be searched upon, operator: EXACT | CONTAINS | STARTS WITH | ENDS WITH, searchValue ) returns all the Nodes found in the different searches.") Stream<NodeResult> multiSearchNodeAll(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final String value); @Procedure("apoc.search.node") @Description("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.") Stream<NodeResult> multiSearchNode(@Name("LabelPropertyMap") final Object labelProperties, @Name("operator") final String operator, @Name("value") final String value); @Context
    public GraphDatabaseService api; @Context
    public Log log; @Context
    public Transaction tx; }
@Test public void testMultiSearchNodeAll() throws Throwable { String query = "call apoc.search.nodeAll('{Person: \"name\",Movie: [\"title\",\"tagline\"]}','CONTAINS','her') yield node as n return count(n) as c"; TestUtil.testCall(db, query, (row) -> assertEquals(6L,row.get("c"))); query = "call apoc.search.nodeAll('{Person: \"name\",Movie: [\"title\",\"tagline\"]}','STARTS WITH','Tom') yield node as n return count(n) as c"; TestUtil.testCall(db, query, (row) -> assertEquals(4L,row.get("c"))); query = "call apoc.search.nodeAll('{Person: \"name\",Movie: [\"title\",\"tagline\"]}','ENDS WITH','s') yield node as n return count(n) as c"; TestUtil.testCall(db, query, (row) -> assertEquals(29L,row.get("c"))); }