Hi,
I'm doing faceting on my data with cypher. It work but it can be very slow. Is it possible to speed up this query which takes over than 10s ? (GuartTimeoutException timeout occured (overtime=1))
Here's the query:
START node=node:node_auto_index(title="fre")
MATCH node-[rel0]-target,
target-[rel1]-node1,
target-[rel2]-node2,
target-[relfacet]-facet
WHERE target.type = "article" AND type(rel0) = "has_lang"
AND type(rel1) = "about" AND node1.`title` = "Phylogeny"
AND type(rel2) = "about" AND node2.`title` = "Models, Genetic"
RETURN type(relfacet) as rel, facet.title as value, count(facet.title) as occ
ORDER BY rel, occ DESC
I have auto indexes on title and type.
Here some infos on the data:
78247 nodes
343866 edges
3 relationships type
1 node "fre" with 2834 relations
1 node "Phylogeny" with 723 relations
1 node "Models, Genetic" with 298 relations
This is not big data at all. Is WHERE using index on Neo4j ? Why is this so slow ?
Thanks,
N.