0
votes

In my Data set there is a node that has properties like those

ex) node 4 name "personid_10" label "Andrew"

And, among all of the nodes, half of them have both of 'name' and 'label' but rest of them only have 'name' property, and this point is very important!

When I built a query like this,

start n=node:nodes(name="personid_10")
return n;

I could get satisfied result of this query.

but in other other case(use 'label' property)

start n=node:nodes(label="Andrew")
return n;

couldn't get any result.

Is there any solution for me?...

1
Did you actually index the nodes with the label property? This is manual operation in pre-2.0 e.g. in Java index().forNodes("nodes").add(node,"label","Andrew") - Michael Hunger

1 Answers

2
votes

You can use a lucene query to do an 'or' on the property keys:

start n=node:nodes('label:Andrew name:personid_10')
return n

Will probably have to do a distinct in case you get duplicates