cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Error while trying to execute 'algo.triangleCount'

Hi ,

Am trying execute the following query to add triangle count,coefficient as properties of nodes to my existing graph, but it is throwing the error below

Failed to invoke procedure algo.triangleCount: Caused by: java.lang.ArrayIndexOutOfBoundsException: -1

Please let me know if the issue if with the browser versions/ something else ?

PFA for my db schema.If the issue is with the directionality of the relationship,by default a direction is assigned to the relationship during creation although direction is not specified
LOAD CSV WITH HEADERS FROM "file:///paper_author_affiliations.tsv" as line FIELDTERMINATOR "\t" MATCH (a:Author{authorId:line.AuthorId}),(p:Papers{paperId:line.PaperId}) CREATE UNIQUE (a)-[:WROTE{authorSequenceNumber:line.AuthorSequenceNumber}]- (p)

Regards,
Nikhil.

5 REPLIES 5

Since algo.triangleCount is throwing the error, we might need to what that call looks like.
also, what is the meta model?

Can you share the algo.triangleCount cypher? The code that is throwing the error.

Here's the cypher am trying to execute:

CALL algo.triangleCount('Author', 'CO_AUTHOR', { write:true,
writeProperty:'trianglesTest', clusteringCoefficientProperty:
'coefficientTest'})

I'm not able to replicate the error locally, algo.triangleCount has never thrown this error for me, but I checked the git repo and it looks like there are several reports of this error. There are known causes listed, such as "if the graph changes while the algo is run", but I see there is a directed graph issue though the conditions required to make it throw the error are not clear to me.