neo4j - How to create an index on a property of a relation -
i need query fetch properties of relation not empty, e.g.
match ()-[r:type]-() r.attr <> "" return r.attr
i guess create index on :type(attr)
creates index on node label type , not on relation property?
or not necessary create index on relation property?
i using neo4j 2.2.3.
indexes on relationships possible using manual indexes.
bevor creating recommend rethinking graph model. being entity or complex value type should modeled nodes. interaction between things in world modeled relationships. typically relationships use weight parameters or metadata properties real attributes.
since queries typically start @ "something" (aka thing aka node) don't need relationship indexes. indexes should used identifying start points traversals.
Comments
Post a Comment