Reputation: 695
I have created a fulltext index "peopleSearch" on 'description' property of node "User" and 'skillname' property of relationship "Has_Skill" . Relationship have some more properties of its own based on my requirement .
I want to query my neo4j database and get all the neo4j entity (both User and Relationship) which have either description text contains "grails" or having skillName "grails".
Upvotes: 0
Views: 129
Reputation: 39905
Manual indexes in Neo4j (and your fulltext indexes are of that kind) are either for nodes or for relationships. You cannot have a combined index for both.
If if that would be possible it wouldn't make any sense since you use the indexes in Neo4j to find start points for traversals. If the index query results would be a combo of nodes and relationships, there is no chance of building up a traversal from that mixed structure.
However in Cypher to can combine two index queries into one using the UNION
:
START users=node:users('name:ABC*') RETURN users as person
UNION
START friends=node:friends('friendName:DEF*') RETURN friends as person
Upvotes: 2