Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j property string limit

Tags:

neo4j

I'm working on a KB type structure, and I'd like to store the free-form text / web content for each KB entry in a property. These can get pretty long - upwards of 60K or more text.

My question is:

  • What is the limit for a string property?
  • Can unstructured text like this be imported via CSV? By unstructured text I mean multiple lines, embedded quotes, HTTP tags, etc.
like image 534
Tim Kuehn Avatar asked Mar 15 '16 16:03

Tim Kuehn


People also ask

What are the limitations of Neo4j?

Neo4j has some upper bound limit for the graph size and can support tens of billions of nodes, properties, and relationships in a single graph. No security is provided at the data level and there is no data encryption. Security auditing is not available in Neo4j.

Can Neo4j handle big data?

Tom's IT Pro in looking at 'Small to Big Data Solutions' notes that graph databases such as Neo4j would be better than Hadoop for some big data problems, particularly those described with networks and its relationships between objects.

How many labels can a node have Neo4j?

A node can have zero to many labels.

Can a node have multiple labels Neo4j?

Neo4j CQL CREATE a Node Label We can say this Label name to a Relationship as "Relationship Type". We can use CQL CREATE command to create a single label to a Node or a Relationship and multiple labels to a Node. That means Neo4j supports only single Relationship Type between two nodes.


1 Answers

There is no size limit for a string. All long strings get externalized into a separate store file, see http://neo4j.com/docs/stable/property-compression.html for details.

This "strings store file" uses internally a block size. If your string is larger, multiple blocks will be allocated resulting in multiple seek and read operation on your disc. The block size can be configure only when creating a new data store using a unofficial config option string_block_size, see https://github.com/neo4j/neo4j/blob/2.3/community/kernel/src/main/java/org/neo4j/graphdb/factory/GraphDatabaseSettings.java#L447.

Importing unstructured text from CSV should work if the strings in question are wrapped in double quotes (") and any double quotes inside the string get doubled, see http://neo4j.com/docs/stable/query-load-csv.html#load-csv-import-data-containing-escaped-characters. I don't remember completely but I think newlines are handled correctly if they are inside a double quoted string.

like image 195
Stefan Armbruster Avatar answered Sep 26 '22 19:09

Stefan Armbruster