0

How can I create and index on combined set of properties of a node, I would like to be able to perform text on 3 or 4 properties of a node that may contain some text , in may case I have an address node and it has city, addressline1, addressline2 and I would like to search any address using text search.

Thank you Oscar

Luis Trigueiros
  • 636
  • 7
  • 21

1 Answers1

0

Compound indices are not yet supported.

2 solutions :

a) Create an extra property being the concatenated representation of the properties to be combined.

b) since neo4j 3.0, you can do hash join index lookups, example :

MATCH (p:Person {adressLine1: "baker street"})
WITH p
MATCH (o:Person {city: "san francisco"})
WHERE p = o
RETURN p
Christophe Willemsen
  • 19,399
  • 2
  • 29
  • 36
  • 1
    For approach (a), there is a slightly more detailed answer at: http://stackoverflow.com/questions/22498054/how-to-create-unique-constraint-involving-multiple-properties-in-neo4j/22499237#22499237 – cybersam May 18 '16 at 22:26