Reputation: 13
i am using auto_inedx for some attributes and it works good for example :
Start myNode=node:node_auto_index( name = "Masoud" )
but when i have 2 groups , for example Users and Employees and its possible that a user and a employee have same name , i search for answer and find this :
START movie=node:movies("title:M*")
MATCH movie<-[:ACTS_IN]-actor
WHERE actor.name = "Kevin Bacon"
RETURN movie.title
what is movies() ??? is that a group of nodes ?
Upvotes: 0
Views: 2205
Reputation: 1073
movies is name of the index. In case of automatic index, we can use node_auto_index. there is an option to manually create an index. In this particular example, movies is an index name for the property title.
When you have two different nodes, users and employees, you can create two different indices 1. one for 'name' property in users node 2. other for 'name' property in employee node.
Example: If you are using Spring Data Neo4j, you can achieve the indexing using annotation,
@Indexed(indexName = "email", indexType = IndexType.FULLTEXT)
String email .
If you are using Java client, you can find example in the following neo4j tutorial, docs.neo4j.org/chunked/milestone/indexing-create.html
Hope that helps
Upvotes: 3