Download The Neo4j Manual v1.4 PDF

TitleThe Neo4j Manual v1.4
LanguageEnglish
File Size2.3 MB
Total Pages226
Table of Contents
                            The Neo4j Manual v1.4.M06
Table of Contents
Introduction
	1. Who should read this
	2. Neo4j highlights
Part I. Reference Documentation
	Chapter 1. Installation & Deployment
		1.1. Deployment Scenarios
			1.1.1. Server
			1.1.2. Embedded
		1.2. System Requirements
			1.2.1. CPU
			1.2.2. Memory
			1.2.3. Disk
			1.2.4. Filesystem
			1.2.5. Software
		1.3. Installation
			1.3.1. Embedded Installation
		1.4. Upgrading
			1.4.1. Normal Upgrade
			1.4.2. Special Upgrade
			1.4.3. Upgrade 1.3 –> 1.4
			1.4.4. Upgrade 1.3.M03 –> 1.3.M04
			1.4.5. Upgrade 1.2 –> 1.3
			1.4.6. Upgrade 1.1 –> 1.2
		1.5. Usage Data Collector
			1.5.1. Technical Information
			1.5.2. How to disable UDC
	Chapter 2. Configuration & Performance
		2.1. Caches in Neo4j
			2.1.1. File buffer cache
				Configuration
			2.1.2. Object cache
				Configuration
				Heap memory usage
		2.2. JVM Settings
			2.2.1. Configuring heap size and GC
		2.3. File system tuning for high IO
		2.4. Compressed storage of short strings
	Chapter 3. Transaction management
		3.1. Interaction cycle
		3.2. Isolation levels
		3.3. Default locking behavior
		3.4. Deadlocks
		3.5. Delete semantics
	Chapter 4. Cypher Query Language
		4.1. Identifiers
		4.2. Start
			4.2.1. Node by id
			4.2.2. Multiple nodes by id
			4.2.3. Node by index lookup
			4.2.4. Node by index query
			4.2.5. Multiple start points
		4.3. Match
			4.3.1. Related nodes
			4.3.2. Outgoing relationships
			4.3.3. Directed relationships and identifier
			4.3.4. Match by relationship type
			4.3.5. Match by relationship type and use an identifier
			4.3.6. Multiple relationships
			4.3.7. Complex matching
		4.4. Where
			4.4.1. Boolean operations
			4.4.2. Filter on node property
			4.4.3. Regular expressions
			4.4.4. Filtering on relationship type
			4.4.5. Property exists
		4.5. Return
			4.5.1. Return nodes
			4.5.2. Return relationships
			4.5.3. Relationship type
			4.5.4. Return property
			4.5.5. Identifier with uncommon characters
			4.5.6. Optional properties
		4.6. Aggregation
			4.6.1. COUNT
			4.6.2. Count nodes
			4.6.3. Count entities
			4.6.4. Count non null values
			4.6.5. SUM
			4.6.6. AVG
			4.6.7. MAX
			4.6.8. MIN
		4.7. Order by
			4.7.1. Order nodes by property
			4.7.2. Order nodes by multiple properties
			4.7.3. Order nodes in descending order
			4.7.4. Ordering null
		4.8. Skip
			4.8.1. Skip first three
			4.8.2. Return middle two
		4.9. Limit
			4.9.1. Return first part
	Chapter 5. Neo4j Server
		5.1. Server Installation
			5.1.1. As a Windows service
			5.1.2. Linux Service
			5.1.3. Macintosh Service
			5.1.4. Multiple Server instances on one machine
		5.2. Server Configuration
			5.2.1. Important server configurations parameters
			5.2.2. Neo4j Database performance configuration
			5.2.3. Logging configuration
			5.2.4. Other configuration options
				Enabling logging from the garbage collector
		5.3. Setup for remote debugging
		5.4. Starting the Neo4j server in high availability mode
			5.4.1. Starting a Neo4j Coordinator
			5.4.2. Starting the Neo4j Server
		5.5. Using the server with an embedded database
			5.5.1. Providing custom configuration
		5.6. Server Plugins
		5.7. Tuning the server performance
			5.7.1. Specifying Neo4j tuning properties
			5.7.2. Specifying JVM tuning properties
		5.8. Unmanaged Extensions
	Chapter 6. REST API
		6.1. Service root
			6.1.1. Get service root
		6.2. Nodes
			6.2.1. Create node
			6.2.2. Create node with properties
			6.2.3. Get node
			6.2.4. Get non-existent node
			6.2.5. Delete node
			6.2.6. Nodes with relationships can not be deleted
		6.3. Relationships
			6.3.1. Create relationship
			6.3.2. Get all relationships
			6.3.3. Get incoming relationships
			6.3.4. Get outgoing relationships
			6.3.5. Get typed relationships
			6.3.6. Get relationships on a node without relationships
		6.4. Relationship types
			6.4.1. Get relationship types
		6.5. Node properties
			6.5.1. Set property on node
			6.5.2. Update node properties
			6.5.3. Get properties for node
			6.5.4. Get properties for node (empty result)
			6.5.5. Property values can not be null
			6.5.6. Property values can not be nested
			6.5.7. Delete all properties from node
		6.6. Relationship properties
			6.6.1. Update relationship properties
		6.7. Indexes
			6.7.1. Create node index
			6.7.2. Create node index with configuration
			6.7.3. Delete node index
			6.7.4. List node indexes
			6.7.5. List node indexes (empty result)
			6.7.6. Add node to index
			6.7.7. Find node by exact match
		6.8. Traversals
			6.8.1. Traversal using a return filter
			6.8.2. Creating a paged traverser
			6.8.3. Paging through the results of a paged traverser
			6.8.4. Paged traverser page size
			6.8.5. Paged traverser timeout
		6.9. Built-in Graph Algorithms
			6.9.1. Find all shortest paths
			6.9.2. Find one of the shortest paths between nodes
			6.9.3. Execute a Dijkstra algorithm with similar weights on relationships
			6.9.4. Execute a Dijkstra algorithm with weights on relationships
		6.10. Batch operations
			6.10.1. Execute multiple operations in batch
			6.10.2. Refer to items created earlier in the same batch job
		6.11. Gremlin Plugin
			6.11.1. Send a Gremlin Script - URL encoded
			6.11.2. Load a sample graph graph
			6.11.3. Sort a result using raw Groovy operations
			6.11.4. Send a Gremlin Script - JSON encoded with table result
		6.12. Cypher Plugin
			6.12.1. Send a Query
	Chapter 7. Indexing
		7.1. Introduction
		7.2. Create
		7.3. Delete
		7.4. Add
		7.5. Remove
		7.6. Update
		7.7. Search
			7.7.1. Get
			7.7.2. Query
		7.8. Relationship indexes
		7.9. Scores
		7.10. Configuration and fulltext indexes
		7.11. Extra features for Lucene indexes
			7.11.1. Numeric ranges
			7.11.2. Sorting
			7.11.3. Querying with Lucene Query objects
			7.11.4. Compound queries
			7.11.5. Default operator
			7.11.6. Caching
		7.12. Batch insertion
			7.12.1. Best practices
		7.13. Auto Indexing
			7.13.1. Configuration
			7.13.2. Search
			7.13.3. Runtime Configuration
			7.13.4. Updating the Auto Index
			7.13.5. Low level details
	Chapter 8. Graph Algorithms
		8.1. Introduction
	Chapter 9. High Availability
		9.1. Architecture
		9.2. Setup and configuration
			9.2.1. Small
			9.2.2. Medium
			9.2.3. Large
			9.2.4. Installation Notes
		9.3. How Neo4j HA operates
	Chapter 10. Operations
		10.1. Backup
			10.1.1. Embedded and Server
			10.1.2. High Availability
			10.1.3. Restoring Your Data
		10.2. Security
			10.2.1. Securing access to the Neo4j Server
		10.3. Monitoring
			10.3.1. JMX
				How to connect to a Neo4j instance using JMX and JConsole
				How to connect to the JMX monitoring programmatically
				Reference of supported JMX MBeans
Part II. Tutorials
	Chapter 11. Graph Database Concepts
		11.1. What is a Graph Database?
			11.1.1. A Graph contains Nodes and Relationships
			11.1.2. Relationships organize the Graph
			11.1.3. Query a Graph with a Traversal
			11.1.4. Indexes look-up Nodes or Relationships
			11.1.5. Neo4j is a Graph Database
		11.2. Comparing Database Models
			11.2.1. A Graph Database transforms a RDBMS
			11.2.2. A Graph Database elaborates a Key-Value Store
			11.2.3. A Graph Database relates Column-Family
			11.2.4. A Graph Database navigates a Document Store
		11.3. The Neo4j Graph Database
			11.3.1. Relationships
			11.3.2. Properties
	Chapter 12. Using Neo4j embedded in Java applications
		12.1. Include Neo4j in your project
			12.1.1. Add Neo4j to the build path
			12.1.2. Add Neo4j as a dependency
				Maven
				Ivy
		12.2. Hello world
		12.3. User database with index
		12.4. Traversal
			12.4.1. The Matrix
			12.4.2. User roles
			12.4.3. New traversal framework
				The Matrix
				User roles
				Walking an ordered path
			12.4.4. Social network
				Simple social model
				Status graph instance
				Activity stream
		12.5. Domain entities
		12.6. Graph Algorithm examples
		12.7. Reading a management attribute
Part III. Tools
	Chapter 13. Web Administration
		13.1. Dashboard tab
			13.1.1. Entity chart
			13.1.2. Status monitoring
		13.2. Data tab
		13.3. Console tab
		13.4. The Server Info tab
	Chapter 14. Neo4j Shell
		14.1. Starting the shell
			14.1.1. Enabling the shell server
			14.1.2. Connecting to a shell server
			14.1.3. Pointing the shell to a path
			14.1.4. Read-only mode
			14.1.5. Run a command and then exit
		14.2. Passing options and arguments
		14.3. Enum options
		14.4. Filters
		14.5. Node titles
		14.6. How to use (individual commands)
			14.6.1. Current node/relationship and path
			14.6.2. Listing the contents of a node/relationship
			14.6.3. Creating nodes and relationships
			14.6.4. Setting, renaming and removing properties
			14.6.5. Deleting nodes and relationships
			14.6.6. Environment variables
			14.6.7. Executing groovy/python scripts
			14.6.8. Traverse
			14.6.9. Query with Cypher
			14.6.10. Indexing
		14.7. Extending the shell: Adding your own commands
		14.8. An example shell session
Part IV. Troubleshooting
	Chapter 15. Troubleshooting guide
	Chapter 16. Community support
Appendix A. Manpages
	neo4j
	neo4j-shell
	neo4j-coordinator
	neo4j-coordinator-shell
                        
Document Text Contents
Page 2

The Neo4j Manual v1.4.M06

The Neo4j Team neo4j.org <http://neo4j.org/>
neotechnology.com <http://neotechnology.com/>

http://neo4j.org/
http://neo4j.org/
http://neotechnology.com/
http://neotechnology.com/

Page 113

REST API

102

}

},

"create_relationship" : "http://localhost:7474/db/data/node/592/relationships",

"paged_traverse" : "http://localhost:7474/db/data/node/592/paged/traverse/{returnType}{?pageSize,leaseTime}",

"all_relationships" : "http://localhost:7474/db/data/node/592/relationships/all",

"incoming_typed_relationships" : "http://localhost:7474/db/data/node/592/relationships/in/{-list|&|types}"

}, {

"outgoing_relationships" : "http://localhost:7474/db/data/node/593/relationships/out",

"data" : {

"name" : "16"

},

"traverse" : "http://localhost:7474/db/data/node/593/traverse/{returnType}",

"all_typed_relationships" : "http://localhost:7474/db/data/node/593/relationships/all/{-list|&|types}",

"property" : "http://localhost:7474/db/data/node/593/properties/{key}",

"self" : "http://localhost:7474/db/data/node/593",

"outgoing_typed_relationships" : "http://localhost:7474/db/data/node/593/relationships/out/{-list|&|types}",

"properties" : "http://localhost:7474/db/data/node/593/properties",

"incoming_relationships" : "http://localhost:7474/db/data/node/593/relationships/in",

"extensions" : {

"FunctionalTestPlugin" : {

"connected_nodes" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/593/connected_nodes",

"pathToReference" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/593/pathToReference",

"getThisNodeOrById" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/593/getThisNodeOrById",

"createRelationships" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/593/createRelationships",

"getRelationshipsBetween" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/593/getRelationshipsBetween"

},

"GraphCloner" : {

"clonedSubgraph" : "http://localhost:7474/db/data/ext/GraphCloner/node/593/clonedSubgraph"

}

},

"create_relationship" : "http://localhost:7474/db/data/node/593/relationships",

"paged_traverse" : "http://localhost:7474/db/data/node/593/paged/traverse/{returnType}{?pageSize,leaseTime}",

"all_relationships" : "http://localhost:7474/db/data/node/593/relationships/all",

"incoming_typed_relationships" : "http://localhost:7474/db/data/node/593/relationships/in/{-list|&|types}"

}, {

"outgoing_relationships" : "http://localhost:7474/db/data/node/594/relationships/out",

"data" : {

"name" : "17"

},

"traverse" : "http://localhost:7474/db/data/node/594/traverse/{returnType}",

"all_typed_relationships" : "http://localhost:7474/db/data/node/594/relationships/all/{-list|&|types}",

"property" : "http://localhost:7474/db/data/node/594/properties/{key}",

"self" : "http://localhost:7474/db/data/node/594",

"outgoing_typed_relationships" : "http://localhost:7474/db/data/node/594/relationships/out/{-list|&|types}",

"properties" : "http://localhost:7474/db/data/node/594/properties",

"incoming_relationships" : "http://localhost:7474/db/data/node/594/relationships/in",

"extensions" : {

"FunctionalTestPlugin" : {

"connected_nodes" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/594/connected_nodes",

"pathToReference" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/594/pathToReference",

"getThisNodeOrById" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/594/getThisNodeOrById",

"createRelationships" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/594/createRelationships",

"getRelationshipsBetween" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/594/getRelationshipsBetween"

},

"GraphCloner" : {

"clonedSubgraph" : "http://localhost:7474/db/data/ext/GraphCloner/node/594/clonedSubgraph"

}

},

"create_relationship" : "http://localhost:7474/db/data/node/594/relationships",

"paged_traverse" : "http://localhost:7474/db/data/node/594/paged/traverse/{returnType}{?pageSize,leaseTime}",

"all_relationships" : "http://localhost:7474/db/data/node/594/relationships/all",

"incoming_typed_relationships" : "http://localhost:7474/db/data/node/594/relationships/in/{-list|&|types}"

}, {

"outgoing_relationships" : "http://localhost:7474/db/data/node/595/relationships/out",

"data" : {

Page 114

REST API

103

"name" : "18"

},

"traverse" : "http://localhost:7474/db/data/node/595/traverse/{returnType}",

"all_typed_relationships" : "http://localhost:7474/db/data/node/595/relationships/all/{-list|&|types}",

"property" : "http://localhost:7474/db/data/node/595/properties/{key}",

"self" : "http://localhost:7474/db/data/node/595",

"outgoing_typed_relationships" : "http://localhost:7474/db/data/node/595/relationships/out/{-list|&|types}",

"properties" : "http://localhost:7474/db/data/node/595/properties",

"incoming_relationships" : "http://localhost:7474/db/data/node/595/relationships/in",

"extensions" : {

"FunctionalTestPlugin" : {

"connected_nodes" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/595/connected_nodes",

"pathToReference" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/595/pathToReference",

"getThisNodeOrById" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/595/getThisNodeOrById",

"createRelationships" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/595/createRelationships",

"getRelationshipsBetween" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/595/getRelationshipsBetween"

},

"GraphCloner" : {

"clonedSubgraph" : "http://localhost:7474/db/data/ext/GraphCloner/node/595/clonedSubgraph"

}

},

"create_relationship" : "http://localhost:7474/db/data/node/595/relationships",

"paged_traverse" : "http://localhost:7474/db/data/node/595/paged/traverse/{returnType}{?pageSize,leaseTime}",

"all_relationships" : "http://localhost:7474/db/data/node/595/relationships/all",

"incoming_typed_relationships" : "http://localhost:7474/db/data/node/595/relationships/in/{-list|&|types}"

}, {

"outgoing_relationships" : "http://localhost:7474/db/data/node/596/relationships/out",

"data" : {

"name" : "19"

},

"traverse" : "http://localhost:7474/db/data/node/596/traverse/{returnType}",

"all_typed_relationships" : "http://localhost:7474/db/data/node/596/relationships/all/{-list|&|types}",

"property" : "http://localhost:7474/db/data/node/596/properties/{key}",

"self" : "http://localhost:7474/db/data/node/596",

"outgoing_typed_relationships" : "http://localhost:7474/db/data/node/596/relationships/out/{-list|&|types}",

"properties" : "http://localhost:7474/db/data/node/596/properties",

"incoming_relationships" : "http://localhost:7474/db/data/node/596/relationships/in",

"extensions" : {

"FunctionalTestPlugin" : {

"connected_nodes" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/596/connected_nodes",

"pathToReference" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/596/pathToReference",

"getThisNodeOrById" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/596/getThisNodeOrById",

"createRelationships" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/596/createRelationships",

"getRelationshipsBetween" : "http://localhost:7474/db/data/ext/FunctionalTestPlugin/node/596/getRelationshipsBetween"

},

"GraphCloner" : {

"clonedSubgraph" : "http://localhost:7474/db/data/ext/GraphCloner/node/596/clonedSubgraph"

}

},

"create_relationship" : "http://localhost:7474/db/data/node/596/relationships",

"paged_traverse" : "http://localhost:7474/db/data/node/596/paged/traverse/{returnType}{?pageSize,leaseTime}",

"all_relationships" : "http://localhost:7474/db/data/node/596/relationships/all",

"incoming_typed_relationships" : "http://localhost:7474/db/data/node/596/relationships/in/{-list|&|types}"

}, {

"outgoing_relationships" : "http://localhost:7474/db/data/node/598/relationships/out",

"data" : {

"name" : "21"

},

"traverse" : "http://localhost:7474/db/data/node/598/traverse/{returnType}",

"all_typed_relationships" : "http://localhost:7474/db/data/node/598/relationships/all/{-list|&|types}",

"property" : "http://localhost:7474/db/data/node/598/properties/{key}",

"self" : "http://localhost:7474/db/data/node/598",

"outgoing_typed_relationships" : "http://localhost:7474/db/data/node/598/relationships/out/{-list|&|types}",

"properties" : "http://localhost:7474/db/data/node/598/properties",

"incoming_relationships" : "http://localhost:7474/db/data/node/598/relationships/in",

Page 225

Manpages

214

Name
neo4j-coordinator — Neo4j Coordinator for High-Availability clusters

Synopsis
neo4j-coordinator <command>

DESCRIPTION
Neo4j Coordinator is a server which provides coordination for a Neo4j High Availability Data cluster.
A "coordination cluster" must be started and available before the "data cluster" can be started. This
server is a member of the cluster.

COMMANDS

console
Start the server as an application, running as a foreground proces. Stop the server using CTRL-C.

start
Start server as daemon, running as a background process.

stop
Stops a running daemonized server.

restart
Restarts a running server.

condrestart
Restarts a server, but only if it was already running.

status
Current running state of the server

install
Installs the server as a platform-appropriate system service.

remove
Uninstalls the system service

dump
Displays thread dump, also saved to the wrapper.log

FILES

conf/coord.cfg
Coordination server configuration.

conf/coord-wrapper.cfg
Configuration for service wrapper.

data/coordinator/myid
Unique identifier for coordinator instance.

Page 226

Manpages

215

Name
neo4j-coordinator-shell — Neo4j Coordinator Shell interactive interface

Synopsis
neo4j-coordinator-shell -server <host:port> [<cmd> <args>]

DESCRIPTION
Neo4j Coordinator Shell provides an interactive text-based interface to a running Neo4j Coordinator
server.

OPTIONS

-server HOST:PORT
Connects to a Neo4j Coordinator at the specified host and port.

Similer Documents