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'

chennupati_8
Node Link

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

Joel
Ninja
Ninja

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

Joel
Ninja
Ninja

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

chennupati_8
Node Link

Here's the cypher am trying to execute:

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

Joel
Ninja
Ninja

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.