# Cypher

**URL:** https://community.neo4j.com/c/neo4j-graph-platform/cypher/12.md

[Latest](https://community.neo4j.com/latest.md) · [Categories](https://community.neo4j.com/categories.md) · [Tags](https://community.neo4j.com/tags.md)

---

## [How can I optimize my Cypher Queries?](https://community.neo4j.com/t/how-can-i-optimize-my-cypher-queries/114)

<div class="topic-metadata">

**Author:** [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Replies:** 4\
**Last updated:** [February 9, 2021, 10:09am UTC](https://community.neo4j.com/t/how-can-i-optimize-my-cypher-queries/114 "2021-02-09T10:09:29Z")

</div>

What should I do if my Cypher query is slower than expected, or uses more memory or CPU than I have? I'm running my queries with Neo4j Browser, copied from my application. What should I do? Are there any good practices…

---

## [About the Cypher category](https://community.neo4j.com/t/about-the-cypher-category/23)

<div class="topic-metadata">

**Author:** [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Replies:** 0\
**Last updated:** [June 11, 2018, 3:32pm UTC](https://community.neo4j.com/t/about-the-cypher-category/23 "2018-06-11T15:32:23Z")

</div>

Questions around Cypher Syntax, Performance, Optimization and openCypher and GQL (Graph Query Language) Refcard Documentation Developer Guide Online Course openCypher awesome-cypher

---

## [Can we convert GraphQL query to Cypher query in .Net Core with Neo4j 4.0?](https://community.neo4j.com/t/can-we-convert-graphql-query-to-cypher-query-in-net-core-with-neo4j-4-0/14709)

<div class="topic-metadata">

**Author:** [@nikhil.kharwade88](https://community.neo4j.com/u/nikhil.kharwade88)\
**Replies:** 2\
**Last updated:** [October 22, 2026, 11:39am UTC](https://community.neo4j.com/t/can-we-convert-graphql-query-to-cypher-query-in-net-core-with-neo4j-4-0/14709 "2026-10-22T11:39:35Z")

</div>

I found GraphQL to Cypher query converter libraries for java and java script but I didn't find any library for .Net Core. Now I am using Neo4j Driver 4.0 in .Net Core for CRUD operation with Cypher query so I want conve…

---

## [Index on datetime field in version \>=5](https://community.neo4j.com/t/index-on-datetime-field-in-version-5/81293)

<div class="topic-metadata">

**Author:** [@BairDev](https://community.neo4j.com/u/BairDev)\
**Replies:** 2\
**Last updated:** [October 2, 2026, 6:47pm UTC](https://community.neo4j.com/t/index-on-datetime-field-in-version-5/81293 "2026-10-02T18:47:39Z")

</div>

There is a pretty old (2022) topic on this issue: Best way to index a datetime field Considering the new index types (range index instead of BTREE index) from version \>= 5 on and the very brief documentation (Temporal v…

---

## [Handling lock contention when merging high-frequency execution telemetry](https://community.neo4j.com/t/handling-lock-contention-when-merging-high-frequency-execution-telemetry/81276)

<div class="topic-metadata">

**Author:** [@zehal0674](https://community.neo4j.com/u/zehal0674)\
**Replies:** 0\
**Last updated:** [September 28, 2026, 6:18pm UTC](https://community.neo4j.com/t/handling-lock-contention-when-merging-high-frequency-execution-telemetry/81276 "2026-09-28T18:18:26Z")

</div>

I am currently working on a security telemetry graph in Neo4j to detect unauthorized automation and script injection patterns across gaming accounts. In our event pipeline, we monitor anomalous client behaviors and flag …

---

## [Duplicate checking](https://community.neo4j.com/t/duplicate-checking/61554)

<div class="topic-metadata">

**Author:** [@dibakar.paul](https://community.neo4j.com/u/dibakar.paul)\
**Replies:** 3\
**Last updated:** [August 10, 2026, 11:56am UTC](https://community.neo4j.com/t/duplicate-checking/61554 "2026-08-10T11:56:32Z")

</div>

I have a dataset in Neo4j dataset . Based on some key properties I need to do DeDup check to find the duplicate records . Please help how to find duplicates . I am using Auro DB

---

## [Possible cypher bug](https://community.neo4j.com/t/possible-cypher-bug/80367)

<div class="topic-metadata">

**Author:** [@wolfgang.irler](https://community.neo4j.com/u/wolfgang.irler)\
**Replies:** 1\
**Last updated:** [August 2, 2026, 4:03pm UTC](https://community.neo4j.com/t/possible-cypher-bug/80367 "2026-08-02T16:03:29Z")

</div>

possible cypher bug false Index entry conflict in Desktop 2.2.1, Query: match(n) where not "\_Entity\_" in labels(n) set n:\`\_Entity\_\` get Index entry conflict: Node(355) already exists with label \`\_Entity\_\` and propert…

---

## [I want age property to automatically count up on April 1 every year](https://community.neo4j.com/t/i-want-age-property-to-automatically-count-up-on-april-1-every-year/44151)

<div class="topic-metadata">

**Author:** [@taichi\_kawakami](https://community.neo4j.com/u/taichi_kawakami)\
**Replies:** 7\
**Last updated:** [June 15, 2026, 2:13pm UTC](https://community.neo4j.com/t/i-want-age-property-to-automatically-count-up-on-april-1-every-year/44151 "2026-06-15T14:13:42Z")

</div>

Hi, I am new to Neo4j and Cypher. Currently I am using Neo4j Desktop and try to develop my company's internal system. Now, there are multiple Employee nodes have age property. I want all age property to automatically c…

---

## [Optimising the cypher query](https://community.neo4j.com/t/optimising-the-cypher-query/76517)

<div class="topic-metadata">

**Author:** [@anshulchaintha7](https://community.neo4j.com/u/anshulchaintha7)\
**Replies:** 8\
**Last updated:** [May 21, 2026, 10:49am UTC](https://community.neo4j.com/t/optimising-the-cypher-query/76517 "2026-05-21T10:49:14Z")

</div>

I have a query that fetches that the information from a specific traversal path. It builds a path in a specific format by fetching tag from each node in this manner A/b/c/d Okay now the query is working well on neo4j b…

---

## [Pre-filtering vector index by tenant property in multi-tenant setup](https://community.neo4j.com/t/pre-filtering-vector-index-by-tenant-property-in-multi-tenant-setup/77103)

<div class="topic-metadata">

**Author:** [@swamy.prateek11](https://community.neo4j.com/u/swamy.prateek11)\
**Replies:** 9\
**Last updated:** [April 9, 2026, 11:37am UTC](https://community.neo4j.com/t/pre-filtering-vector-index-by-tenant-property-in-multi-tenant-setup/77103 "2026-04-09T11:37:05Z")

</div>

We have a multi-tenant app using a vector index for similarity search. Each node has a company\_id property identifying the tenant. Current approach (post-filtering): CALL db.index.vector.queryNodes('my\_vector\_index', 5…

---

## [Can we filter the graphs and perform vector search?](https://community.neo4j.com/t/can-we-filter-the-graphs-and-perform-vector-search/72001)

<div class="topic-metadata">

**Author:** [@falcon14497](https://community.neo4j.com/u/falcon14497)\
**Replies:** 1\
**Last updated:** [February 10, 2026, 4:25pm UTC](https://community.neo4j.com/t/can-we-filter-the-graphs-and-perform-vector-search/72001 "2026-02-10T16:25:24Z")

</div>

Hi community Above is my graph model. Can I filter my graphs based categories or subcategories get the complaint ids and then perform vector search on the Complaint node? Vector index is also created on the complain…

---

## [Question about dynamic matching on relation and depth traversal (\*x..y)](https://community.neo4j.com/t/question-about-dynamic-matching-on-relation-and-depth-traversal-x-y/75986)

<div class="topic-metadata">

**Author:** [@oscarsjocrona](https://community.neo4j.com/u/oscarsjocrona)\
**Replies:** 8\
**Last updated:** [December 2, 2025, 1:14pm UTC](https://community.neo4j.com/t/question-about-dynamic-matching-on-relation-and-depth-traversal-x-y/75986 "2025-12-02T13:14:36Z")

</div>

I’m using neo version 5.26.17 I’m trying to use dynamic matching because I want to create generic queries with parameterized relations. But I found this strange behavior, can somebody explain why it ignores the filter o…

---

## [Queries related to VectorCypherRetriver from neo4j\_graphrag.retrivers](https://community.neo4j.com/t/queries-related-to-vectorcypherretriver-from-neo4j-graphrag-retrivers/75955)

<div class="topic-metadata">

**Author:** [@falcon14497](https://community.neo4j.com/u/falcon14497)\
**Replies:** 2\
**Last updated:** [November 29, 2025, 8:58am UTC](https://community.neo4j.com/t/queries-related-to-vectorcypherretriver-from-neo4j-graphrag-retrivers/75955 "2025-11-29T08:58:09Z")

</div>

Hi Community I am using VectorCypherRetriver method for performing vector search with graph traversal. When I use this method I am getting results which has similarity score greater than 0.7 and blanks for less than 0.7…

---

## [Difference between these three CYPHER queries](https://community.neo4j.com/t/difference-between-these-three-cypher-queries/75746)

<div class="topic-metadata">

**Author:** [@mranand4](https://community.neo4j.com/u/mranand4)\
**Replies:** 7\
**Last updated:** [November 11, 2025, 4:24pm UTC](https://community.neo4j.com/t/difference-between-these-three-cypher-queries/75746 "2025-11-11T16:24:31Z")

</div>

Hi all, I wanted to understand why ANY and apoc’s subGraph queries are faster than typical Neo4J query. I’ve a graph with some 200M nodes with few large node clusters (connected nodes). These large clusters have up-to ~…

---

## [Regarding With Clause in Cypher Query in Neo4j 4x](https://community.neo4j.com/t/regarding-with-clause-in-cypher-query-in-neo4j-4x/75861)

<div class="topic-metadata">

**Author:** [@tulika.munshi](https://community.neo4j.com/u/tulika.munshi)\
**Replies:** 2\
**Last updated:** [November 7, 2025, 12:50pm UTC](https://community.neo4j.com/t/regarding-with-clause-in-cypher-query-in-neo4j-4x/75861 "2025-11-07T12:50:57Z")

</div>

Hi, I am trying to run following cypher query in Neo4j (version 4.4.5) CALL { MATCH (n:NEO\_OBJECT) RETURN n.name } WITH n.name WHERE n.name = 'Test Object 8' RETURN n.name However I get the error - "Variable \`n\`…

---

## [2nd degree relations lookup seems very slow. Can I improve it somehow?](https://community.neo4j.com/t/2nd-degree-relations-lookup-seems-very-slow-can-i-improve-it-somehow/74167)

<div class="topic-metadata">

**Author:** [@mike.kurzeja](https://community.neo4j.com/u/mike.kurzeja)\
**Replies:** 19\
**Last updated:** [October 24, 2025, 11:47pm UTC](https://community.neo4j.com/t/2nd-degree-relations-lookup-seems-very-slow-can-i-improve-it-somehow/74167 "2025-10-24T23:47:29Z")

</div>

Hi, I'm using Neo4j to store relations between 3 entities: USER, PROFILE, COMPANY. Here is my schema: (:USER)-\[:CONNECTED\_WITH\]-\>(:PROFILE) (:PROFILE)-\[:WORKED\_AT\]-\>(:COMPANY) (:PROFILE)-\[:CURRENTLY\_WORKS\_AT\]-\>(:COMP…

---

## [How to visualise a neo4j graph in python?](https://community.neo4j.com/t/how-to-visualise-a-neo4j-graph-in-python/43961)

<div class="topic-metadata">

**Author:** [@nnths4](https://community.neo4j.com/u/nnths4)\
**Replies:** 13\
**Last updated:** [October 21, 2025, 3:24pm UTC](https://community.neo4j.com/t/how-to-visualise-a-neo4j-graph-in-python/43961 "2025-10-21T15:24:08Z")

</div>

how to receive the graph from neo4j to python. Is there any way that I can visualize that graph developed by neo4j in python?

---

## [How to optimize Query that runs out of memory](https://community.neo4j.com/t/how-to-optimize-query-that-runs-out-of-memory/75633)

<div class="topic-metadata">

**Author:** [@martijn](https://community.neo4j.com/u/martijn)\
**Replies:** 7\
**Last updated:** [October 16, 2025, 12:32pm UTC](https://community.neo4j.com/t/how-to-optimize-query-that-runs-out-of-memory/75633 "2025-10-16T12:32:21Z")

</div>

I’ve got a query that’s slow and runs out of memory, probably because there are way too many paths. A simplified version of the query looks like this: MATCH p=(a:A)--\>(:B)\<-\[:Flow\*0..5\]-(:B)--\>(c:C) RETURN p, a, c The …

---

## [Unable to run GDS algorithm](https://community.neo4j.com/t/unable-to-run-gds-algorithm/75634)

<div class="topic-metadata">

**Author:** [@percyjay1998](https://community.neo4j.com/u/percyjay1998)\
**Replies:** 3\
**Last updated:** [October 13, 2025, 11:30am UTC](https://community.neo4j.com/t/unable-to-run-gds-algorithm/75634 "2025-10-13T11:30:06Z")

</div>

neo4j and gds versions: Graph Projection CALL { MATCH(nodes:Incident|Query) WHERE nodes.lastTime \>= datetime() - duration({days:30}) RETURN gds.graph.project( …

---

## [Kafka Sink -\> Cypher failing](https://community.neo4j.com/t/kafka-sink-cypher-failing/75648)

<div class="topic-metadata">

**Author:** [@georgelza](https://community.neo4j.com/u/georgelza)\
**Replies:** 2\
**Last updated:** [October 10, 2025, 5:20am UTC](https://community.neo4j.com/t/kafka-sink-cypher-failing/75648 "2025-10-10T05:20:56Z")

</div>

Pretty sure I’m looking straight over the error. shell script #!/bin/bash echo "Creating 'Children' nodes sink..." export NEO4J\_CYPHER=$(cat create\_children\_node\_sink.cypher) curl -X POST http://localhost:8083/connect…

---

## [Unpacking a event.accounts thats array of record](https://community.neo4j.com/t/unpacking-a-event-accounts-thats-array-of-record/75645)

<div class="topic-metadata">

**Author:** [@georgelza](https://community.neo4j.com/u/georgelza)\
**Replies:** 6\
**Last updated:** [October 9, 2025, 6:40pm UTC](https://community.neo4j.com/t/unpacking-a-event-accounts-thats-array-of-record/75645 "2025-10-09T18:40:18Z")

</div>

Hi all. Trying to get a Kafka → Neo4J sink to work. Going to include my shells script, the Kafka sink json and the “base” cypher script and an example of the message. I’m trying to extract the accounts from the event.…

---

## [COLLECT Return bug (CYPHER25)](https://community.neo4j.com/t/collect-return-bug-cypher25/75383)

<div class="topic-metadata">

**Author:** [@joshcornejo](https://community.neo4j.com/u/joshcornejo)\
**Replies:** 11\
**Last updated:** [September 22, 2025, 7:04am UTC](https://community.neo4j.com/t/collect-return-bug-cypher25/75383 "2025-09-22T07:04:46Z")

</div>

This is a fragment of a query I am modifying (originally I had 1 MATCH but my graph has changed and I need to separate it into 2: MATCH (P:Node { uuid: 'some\_uuid' }) -\[a:someRelLabel1\*0..1\]-\>(Q:ALabel) MATCH (P)-…

---

## [Full schema counts filtered from perspective of a node](https://community.neo4j.com/t/full-schema-counts-filtered-from-perspective-of-a-node/75333)

<div class="topic-metadata">

**Author:** [@sonjar4ai](https://community.neo4j.com/u/sonjar4ai)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 5:10pm UTC](https://community.neo4j.com/t/full-schema-counts-filtered-from-perspective-of-a-node/75333 "2025-09-05T17:10:59Z")

</div>

Hi community! I am trying to return a query result (either cypher or apoc) which will return schema counts (nodes and relationships) based on the perspective of a specific node. I want to create a query that will return …

---

## [CYPHER25 - alter database not working](https://community.neo4j.com/t/cypher25-alter-database-not-working/75020)

<div class="topic-metadata">

**Author:** [@joshcornejo](https://community.neo4j.com/u/joshcornejo)\
**Replies:** 10\
**Last updated:** [September 5, 2025, 3:47pm UTC](https://community.neo4j.com/t/cypher25-alter-database-not-working/75020 "2025-09-05T15:47:27Z")

</div>

After upgrading and from the documentation to migrate to Cypher 25 … I am getting an error:

---

## [Cypher Query to only return a limited amount of connected nodes](https://community.neo4j.com/t/cypher-query-to-only-return-a-limited-amount-of-connected-nodes/75195)

<div class="topic-metadata">

**Author:** [@joost.rehder](https://community.neo4j.com/u/joost.rehder)\
**Replies:** 2\
**Last updated:** [August 27, 2025, 8:03pm UTC](https://community.neo4j.com/t/cypher-query-to-only-return-a-limited-amount-of-connected-nodes/75195 "2025-08-27T20:03:37Z")

</div>

I have a graph with “Chunk” nodes that each have about 5 connected nodes of various types. I would like to know a cypher query which returns every “Chunk” node and say only 3 connected nodes per “Chunk” node. I already …

---

## [JSON projection leading to invalid json](https://community.neo4j.com/t/json-projection-leading-to-invalid-json/75219)

<div class="topic-metadata">

**Author:** [@jeromebjerome](https://community.neo4j.com/u/jeromebjerome)\
**Replies:** 2\
**Last updated:** [August 25, 2025, 11:41am UTC](https://community.neo4j.com/t/json-projection-leading-to-invalid-json/75219 "2025-08-25T11:41:54Z")

</div>

Using community 2025.07.1 I have an issue regarding the custom JSON I generate from my cypher. My query works, here is the RETURN part (from a string template where I replace the $var$) RETURN { results: collect(…

---

## [Apoc.math.regr calculations](https://community.neo4j.com/t/apoc-math-regr-calculations/39689)

<div class="topic-metadata">

**Author:** [@raghad.baiad](https://community.neo4j.com/u/raghad.baiad)\
**Replies:** 2\
**Last updated:** [August 2, 2025, 8:44am UTC](https://community.neo4j.com/t/apoc-math-regr-calculations/39689 "2025-08-02T08:44:38Z")

</div>

Hello Neo4j knowledgable community, I have a question regarding one of the apoc math functions, namely apoc.math.regr I have been using it to compute the linear regression estimators (slope, intercept) and the goodness…

---

## [Calculating from relationships in a multi-node path](https://community.neo4j.com/t/calculating-from-relationships-in-a-multi-node-path/74940)

<div class="topic-metadata">

**Author:** [@clowesia](https://community.neo4j.com/u/clowesia)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 11:18pm UTC](https://community.neo4j.com/t/calculating-from-relationships-in-a-multi-node-path/74940 "2025-07-30T23:18:51Z")

</div>

I have a non-cyclical graph, where all the nodes are of type (label) Entity and all relationships are of type OWNS. Each relationship is guaranteed to have a property Percentage, which is the numeric data type. Each node…

---

## [Leader node in Neo4j5.26.6](https://community.neo4j.com/t/leader-node-in-neo4j5-26-6/74692)

<div class="topic-metadata">

**Author:** [@gedala.kumar.ext](https://community.neo4j.com/u/gedala.kumar.ext)\
**Replies:** 4\
**Last updated:** [July 26, 2025, 8:45am UTC](https://community.neo4j.com/t/leader-node-in-neo4j5-26-6/74692 "2025-07-26T08:45:10Z")

</div>

Hi Team, Before upgrade of neo4j from 4.4 to 5.26.0, we have leader and follower concept. When we try to load the data, we will place the file in leader node import folder and load the data. Now in newer version the le…

---

## [Deviation in the graph while generating kg](https://community.neo4j.com/t/deviation-in-the-graph-while-generating-kg/74866)

<div class="topic-metadata">

**Author:** [@quantum.10](https://community.neo4j.com/u/quantum.10)\
**Replies:** 0\
**Last updated:** [July 25, 2025, 6:26am UTC](https://community.neo4j.com/t/deviation-in-the-graph-while-generating-kg/74866 "2025-07-25T06:26:53Z")

</div>

I have user neo4j labs (aka) LLM graph builder and also used simple-KG-pipeline from graph academy. we have noticed that every time running, the deviation of the graph is varying for each run. --- Is there any option…

[Next page](https://community.neo4j.com/c/neo4j-graph-platform/cypher/12.md?page=1)
