Store large values in KB
- Last updated on November 21, 2022 at 2:12 PM
KB’s graph database, Neo4j, is configured to use a certain type of index by default, that has a limit of 4036 characters for the stored values. If some values need to be stored in Neo4j, that have a larger size, it is possible to support up to 32766 characters.
This can be done by changing the index type, but be aware that the performance of the browsing experience could be impacted.
The change requires to reload the data into KB/Neo4j.
How to change the index type in Neo4j :
1 . Change the default index type : in the file <neo4j_home>/conf/neo4j.conf , activate the “lucene-1.0” index type by uncommenting its line, and commenting the next one with the “native-btree-1.0” :
...
#Mondeca : use previous index type, due to limitations in value size
#dbms.index.default_schema_provider=lucene-1.0
dbms.index.default_schema_provider=native-btree-1.0
...
2. Restart Neo4j :
<neo4j_home>/bin$ neo4j restart
3. Reset the Neo4j database: this command flushes the content of the database, and reinitializes the indices. You will have to reload your data into KB after this operation.
<neo4j_home>/bin$ ./reset_db.sh