Database Reference
In-Depth Information
The following code shows how, having turned on auto-indexing of node properties with a
key of name , you can access the index and use it to find nodes with a particular value for
the name property:
Usingtheschemaandauto-indexingfacilitiesofferedbyNeo4jmeanslessworkfortheap-
plication developer but also less control over what gets indexed. A naïve strategy of index-
ing all properties would have significant implications, for performance of graph mutation
and also for disk space requirements. The following section will explore these trade-offs in
greater detail.
5.6. The cost/benefit trade-off of indexing
HavingseenthedifferentapproachestoindexingofferedbyNeo4j,we'llturnourattention
to the trade-offs you need to consider when determining which indexing strategy is right
for your application. You're probably starting to realize that Neo4j is extremely flexible
when it comes to both indexing and the ways you can model your data.
For example, you could have modeled the social network data in a completely different
fashion, which would have an impact on the indexing strategy. Figure 5.4 shows one al-
ternative representation of the data, with intermediary nodes that represent Kate's movies
and friends.
Search WWH ::




Custom Search