neo4j 3.4 - Can't add spatial point in node creation (Current record format does not support POINT_PROPERTIES.) - neo4j

I just upgraded a docker container to Neo4j 3.4, excited to start using some of its new features, most importantly their native support for spatial data.
I tried running a test query to create an example node with a point like so:
CREATE (n:LocationNode { name: 'New York', location: point({latitude: 0.0, longitude: 0.0}) })
The result was an exception thrown which reads as follows:
Neo.DatabaseError.General.UnknownError: Current record format does not support POINT_PROPERTIES. Please upgrade your store to the format that support requested capability.
I am unaware of any configuration required to add support for spatial data. Is there anything I need to configure or enable to support point properties?
Thanks in advance.

I think it would also have worked if you set allow_store_upgrade=true before starting Neo4j 3.4 on an older store. Neo4j can run with older store formats without requiring an upgrade, but in that case you will also not get the features of the new formats (like support for Point and DateTime as property types).
Note that this does not also cover index formats, so even if you allow_store_upgrade=true, pre-existing indexes might not support the newer features (like native indexes for strings, datetime and point). If you also want to upgrade the indexes to get the newer features, drop and recreate them.

I solved the issue by creating a new store by backing up the old data, deleting the old graph.db store from the previous version and creating a new one.
Classic me, trying to fix something for hours, finally deciding to place a question here, only to find a solution minutes later.

Related

Neo4j: Unsupported administration command: CREATE DATABASE demo

I want create new database 'demo' in neo4j, but I see a bug:
I was search but can't find result, can you help me? Thank all!
In the URL you used to install Neo4j, there is a remark about the community version of Neo4j and how it doesn't support multiple databases.
Note: The Community Edition of Neo4j supports running a single
database at a time. Additionally, the Community version does not
include the capability to assign roles and permissions to users so
those steps are not included in this tutorial. For more information
about various features that are supported by the Community Edition of
Neo4j, consult the Neo4j Documentation here.
Go to the neo4j.conf file and uncomment this line
dbms.default_database=neo4j
Change the neo4j to whatever database name you want for a new database.
Note: names must have between 3 and 63 characters.
For example: dbms.default_database=mydatabase
after that add a new database name. then we can maintain new DB but we can't switch to old one, if we need to do that we have to comment above mentioned line again

Why doesn't Neo4j show any system information (:sysinfo) in the browser?

I recently upgraded to Neo4j 4.0.6. (Community Edition)
After upgrading my "old" Neo4j database the browser :sysinfo command (Chrome and Safari) doesn't show any information. It just displays the empty tables for Store Size, id Allocation etc.
All the tables and labels are shown as in Neo4j 3.x but no values are prompted. It doesn't matter if I change the "Use Database" settings (switch to system and back) or if stop and restart the server. No entries for :sysinfo show up.
Any idea how to reactivate the DB :sysinfo in the browser interface again is greatly appreciated.
Krid
I tend to think its an issue with recent versions.
It caused me to believe a multi upgrade store was incorrect.
So I went the long 'dump to cypher and reimport' route.
After node import, sysinfo was working (4.1 CE)
This behaviour appeared when I added relations
CALL db.schema.visualization() is broken too (no graph tab)
What a time loss, I tell you.
Wont count the days
Somewhere I read to reset the indexes, be sure btree was used.
No, it didnt work.
your next move is to file an issue
It seems ppl also have this issue since 3.5 w/ clusters
https://github.com/neo4j/neo4j/issues?q=is%3Aissue+sysinfo

Error occurs when creating a new database under Neo4j 4.0

I'm using Debian 9.9 and the version of Neo4j is 4.0. I'm having problems creating a new database using the neo4j browser. The instruction I followed is this.
I have tried the following Cypher command:
create database myNewDatabase
However, an error pops up like this:
Neo.ClientError.Statement.NotSystemDatabaseError
Unsupported administration command: create database myNewDatabase
Please let me know what the error message means and how I can solve it. Thx in advance:-)
In v. 4 (release Feb. 2020) of the professional version of Neo4j, it's easy to create new databases. Documentation
In the community edition, it takes a hack:
1. Edit the file NEO4J_HOME\conf\neo4j.conf
2. Un-comment the line: dbms.default_database=neo4j
3. Change the neo4j to whatever database name you want for a new database. Note: names must have between 3 and 63 characters. For example: dbms.default_database=mydatabase
4. Save the file
5. (If applicable) Kill the database server, and close the browser window with the Neo4j UI
6. Start the neo4j server, and open a new browser window, pointed as usual to http://localhost:7474/
7. Both the old (default) database, "neo4j" and the one you just created will show up. However, attempting to switch between them causes an error. If a switch is desired, repeat the above steps starting from (3)
Note: the above steps will create a folder named mydatabase (or whatever name you used), in NEO4J_HOME\data\databases , and it will populate its contents.
I personally think that switching between databases is such a BASIC operation that Neo4j ought to make it easily accessible in the Community edition!
I think I've got the answer to my question. It turns out that my license (the community edition) is not supported for working with multiple databases. An alternative could be this.

Core data Missing Model Version?

I actually have a project with 6 core data models like V1 to V6,all are on app stores now when I am trying to update app from one of the older version (core data modelV3) to the current version it crashes (schema mismatch)
when investigated actually V3 model version is different between two project version from older V3 Model to current Model V3.
as in V3 version i added new entity and did not do LightWeight migration(forgot to do it), now is it any way I can allow users to upgrade this older app version with V3 model to the current app version like by solving this (Missing migration issue)
Please suggest any way to add a missing migration model if possible to provide smith upgradtion of the older app version to the current app version.
addPersistentStore should automatically perform necessary lightweight migration. Check if that code is reachable in all your application starting paths.
For that to happen, you need to supply correct set of options, as below:
do {
let options = [ NSInferMappingModelAutomaticallyOption : true,
NSMigratePersistentStoresAutomaticallyOption : true]
try persistentStoreCoordinator.addPersistentStore(ofType: NSSQLiteStoreType,
configurationName: nil,
at: persistentStoreURL,
options: options)
} catch {
fatalError("Problem loading Persistent Store")
}
Please also make sure your main xcdatamodel file points to latest version of your datamodel. Also note that following picture is taken after selecting your latest version xcdatamodel file (yourdatamodel 2.xcdatamodel), not the root xcdatamodel file (yourdatamodel.xcdatamodel).
A word of caution:
Reconsider: do you really need something beyond lightweight? In most situations, lightweight should resolve your problems.
You can get away with lightweight by adding more fields and stop using older fields in your code, thus making the task easier for Core Data. For rows relying on older fields, simply run some insert/update/delete operation if core data model version change is detected.
In order to check where lightweight fails, you can consider enabling following XCode argument:
-com.apple.CoreData.MigrationDebug 1
If lightweight isn't capable of fully migrating your model (such as you have renamed your entities, or data types have changed, which is very unrealistic and you should really reconsider your design if you are doing this), then you can consider this somewhat complex solution:
add persistent store with older model version and back up existing rows in some external file (non core data)
deleting the old persistent store and recreate it using addPersistentStore + newer model version
use newer persistent store to insert backed up data
If all else fails, then consider mapping model alternative. Refer to this article for more details.

can liquibase be used to work with two different schema versions of the db at the same time?

I'm trying to overcome the following issue...
I have a MariaDB database that is used for an IOS application.
I'm about to release a new version to the apple store that uses a different version of the schema of the database. means all achievement related tables are modified.
can liquibase be used to configure the changes and allow selected users to connect and work with the schema as if the old schema version is configured, and to actually make the actual changes to the new schema?
before I release the application I need to provide apple with a test version so they will confirm it. so I want users that are connected from apple to see the new achievements features and to work with the new schema while regular users to still be able to user to previous version of the application and to work with the old schema that behind the scenes will actually update the database according to the new schema.
I hope I explained myself properly.
can Liquibase do that ? or it's just like a git for db changes ?
thank you! :)

Resources