Skip to content

Altered behavior with cypher result on new engine #3244

@ExtReMLapin

Description

@ExtReMLapin

Hello

Same context from this issue #3218 , same db, same query:

MATCH (searchedChunk:CHUNK) WHERE ID(searchedChunk) IN $_ids
            MATCH (sourceDoc:DOCUMENT)<-[chunkDocRel:in]-(searchedChunk:CHUNK)
            OPTIONAL MATCH (searchedChunk:CHUNK)<-[chunkNerOneRel:in]-(nerOne:NER)
            OPTIONAL MATCH (nerOne:NER)-[nerOneNerTwoRel]->(nerTwo:NER)-[chunkNerTwoRel:in]->(searchedChunk:CHUNK)
            OPTIONAL MATCH (searchedChunk:CHUNK)<-[themeToChunkRel:topic]-(theme:THEME)
            RETURN 
                collect(DISTINCT searchedChunk) AS searchedChunks,
                collect(DISTINCT sourceDoc) AS sourceDocs,
                collect(DISTINCT nerOne) AS nerOnes,
                collect(DISTINCT nerTwo) AS nerTwos,
                collect(DISTINCT theme) AS themes,
                collect(DISTINCT chunkDocRel) AS chunkDocRels,
                collect(DISTINCT chunkNerOneRel) AS chunkNerOneRels,
                collect(DISTINCT nerOneNerTwoRel) AS nerOneNerTwoRels,
                collect(DISTINCT chunkNerTwoRel) AS chunkNerTwoRels,
                collect(DISTINCT themeToChunkRel) AS themeToChunkRels
            

params : {'_ids': ['#1:0']}

ANOTHERORANO-backup-20260124-081534881.zip

Execution takes around 5 seconds. instead of 0.05 with old gremlin engine


OLD GOOD RETURNED DATA WITH THIS QUERY :

json_ok.json

NEW BAD RETURNED DATA WITH NEW OPENCYPHER ENGINE :

json_not_ok.json

In broken result,

  • nerTwos is empty
  • searchedChunks has too much datas, even NER nodes even if query says MATCH (searchedChunk:CHUNK) so it enforces node type

I could show everything wrong but I think it's going to take more time for me to list everything than you to find the issue :v

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions