Database Reference
In-Depth Information
This example will behave exactly the same as the previous one, with the only difference
being in the argument to the index lookup. This time the entire index argument is passed
withindoublequotes,anditcontainsanativeLucenequery.Thisallowsyoutotakeadvant-
ageofthepowerfulLucenequeryconstructs,likewildcardsormultiplepropertymatching.
Note
The documentation about native Lucene querying capabilities is available on the Lucene
website: http://lucene.apache.org/core/3_6_0/queryparsersyntax.html .
Here's an example of using a native Lucene query in Cypher:
Note
Automatic indexing, which we described in chapter 5 , can also be used as part of a Cypher
query in the same manner. All you have to do is use node_auto_index for the index
name instead of users in the preceding query.
Next, let's take a look at how you can use schema-based indexes on labels to look up start
nodes in a Cypher query.
Using a schema-based index to look up the starting node(s)
In earlier chapters we discussed how you can type Neo4j nodes by assigning labels to
nodes. We also mentioned how labels can be used as schema-based, built-in indexes for
graph lookups. You can use the same indexes to look up nodes in Cypher.
Let's take a look at how you can use labels to find user nodes by name:
Search WWH ::




Custom Search