Search code examples
neo4jcypher

match in clause in cypher


How can I do an match in clause in cypher

e.g. I'd like to find movies with ids 1, 2, or 3.

match (m:movie {movie_id:("1","2","3")}) return m

if you were going against an auto index the syntax was

START n=node:node_auto_index('movie_id:("123", "456", "789")')

how is this different against a match clause


Solution

  • The idea is that you can do:

    MATCH (m:movie)
    WHERE m.movie_id in ["1", "2", "3"]
    

    However, this will not use the index as of 2.0.1. This is a missing feature in the new label indexes that I hope will be resolved soon. https://github.com/neo4j/neo4j/issues/861