MATCH
(:Person {id: 19791209310731})-[:KNOWS*3..5]-(person:Person)
WITH DISTINCT person
MATCH
(person)-[:IS_LOCATED_IN]->(:City)-[:IS_PART_OF]->(:Country {name: 'Pakistan'}),
(person)<-[:HAS_CREATOR]-(message:Message)-[:HAS_TAG]->(:Tag)-[:HAS_TYPE]->
(:TagClass {name: 'MusicalArtist'})
MATCH
(message)-[:HAS_TAG]->(tag:Tag)
RETURN
person.id,
tag.name,
count(DISTINCT message) AS messageCount
ORDER BY
messageCount DESC,
tag.name ASC,
person.id ASC
LIMIT 100
Elasticsearch does not offer these sorts of pathfinding queries because it is a distributed-by-design system and these sorts of mass exploration questions demand low-latency localised access to all data. This is why neo4j is a “scale up” and not a “scale out” solution.
Thank you so much for the answer. I am using Graphaware procedures ( for eg: CALL ga.es.queryNode) in Neo4j to query Elasticsearch. So is it possible to write this Cypher query in Elasticsearch using Graphaware ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.