Skip to content

Instantly share code, notes, and snippets.

@motey
Created March 30, 2020 16:04
Show Gist options
  • Save motey/cf08e7415aa67bcb710411f8447748dc to your computer and use it in GitHub Desktop.
Save motey/cf08e7415aa67bcb710411f8447748dc to your computer and use it in GitHub Desktop.
List fulltext papers with title
```cypher
MATCH (p:Paper)-[pr:PAPER_HAS_BODY_TEXT]->(c:Body_text:CollectionHub)-[r:BODY_TEXT_HAS_BODY_TEXT]->(t:Body_text)
WITH p.title as title,collect({txt:t.text, pos:r.position}) as text
UNWIND text as t
WITH title, t
order by t.pos
RETURN title, collect(t.txt) limit 4
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment