sverze
sverze

Reputation: 95

NEO4J Cypher query START index query with multiple nodes

Is it possible to write an cypher query that can START with an exact index query for multiple nodes?

For example:

START n=node:indexName (key="value1", key="value2" ...)

I was unable to achieve something like the above, I am about to explore whether this can be done with a lucene query.

Many Thanks.

Upvotes: 3

Views: 3036

Answers (2)

user305883
user305883

Reputation: 1741

You can:

START thing1 = node:topic('name:(keyword1)'), thing2 = node:topic('name:(keyword2)')

it will look for two topics, containing each a different value;

start n=node:topic('name:(keyword1 AND keyword2)') return n

it will look for multiple keywords in the same node

Upvotes: 0

MonkeyBonkey
MonkeyBonkey

Reputation: 47911

I just asked a very similar question:

querying with an "IN" clause using the index in neo4j with Cypher

And Peter answered with the following

start n = node:indexName('key:123 OR key:456')

Upvotes: 5

Related Questions