I would like an example on how I can do the simple operation of testing for a nodes existence? I don't have any references so the test will have to be based on the values in the node. Is this possible?
So you want to check to see if there's any node, anywhere in the entire graph, where Foo == "Bar"? (This will be terrible if you have more than 1000 or so nodes in your graph. You should use an index.)
Or you want to check if node 67 exists?
-- Tatham
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?
I would like an example on how I can do the simple operation of testing for a nodes existence? I don't have any references so the test will have to be based on the values in the node. Is this possible?
Thank you.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:
Public class MyNode
{
Public string Foo { get; set }
}
I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?
So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)
Or you want to check if node 67 exists?
-- Tatham
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?
I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?
Thank you.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
The type information only exists in .NET to help us serialize and deserialize into known models, and to provide IntelliSense through the query syntax where possible. This information is not in Neo4j. To Neo4j, you just have property bags.
You can run a Cypher query like this:
START n=node(*)
WHERE n.Id! = 123
RETURN n
But that will read every single node off the disk. Sloooow.
An index is the better way to do this.
How many nodes do you have? 10, 100, 1000, 10000, …?
There's also the CREATE UNIQUE clause in Cypher which will do upsert style operations. We expose this clause via the wrapper in a simple way, but not a great way. It needs some polish.
On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net<mailto:rkevinbur...@charter.net>> wrote:
I guess I want the first query. I was hoping that the query would be limited since I only want to query all of the nodes of a specific type that have in your words the property ‘Foo == Bar’. Say I have the following class:
Public class MyNode
{
Public string Foo { get; set }
}
I run into this situation since our relational database can have many duplicates and before I create a whole new node I want to know if there are any nodes with that same value and instead of creating it I want to ‘get’ it. Am I thinking about this wrong?
From: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com> [mailto:neo4jclient@googlegroups.com] On Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com>
Subject: RE: Test for existence?
So you want to check to see if there’s any node, anywhere in the entire graph, where Foo == "Bar"? (This will be terrible if you have more than 1000 or so nodes in your graph. You should use an index.)
Or you want to check if node 67 exists?
-- Tatham
From: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com> [mailto:neo4jclient@googlegroups.com] On Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com<mailto:neo4jclient@googlegroups.com>
Subject: Test for existence?
I would like an example on how I can do the simple operation of testing for a nodes existence? I don't have any references so the test will have to be based on the values in the node. Is this possible?
Thank you.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Neo4jClient" group.
To unsubscribe from this group, send email to neo4jclient+unsubscribe@googlegroups.com<mailto:neo4jclient+unsubscribe@goo glegroups.com>.
For more options, visit https://groups.google.com/groups/opt_out.
There is very little info on Cypher queries with neo4jclient.
I am planning on about 100000 nodes after the population from SQL server
happens but at first there will be only a few. Then as the population
continues there will be more and more. If an index is a better way how do I
create an index with neo4jclient?
I am relatively new to neo4j so I don't know the benefit of an 'upsert
operation' or what 'CREATE UNIQUE' will do. They both seem Cypher related
and again using Cypher with neo4jclient doesn't have a lot of documentation
on it that I could find.
Thank you.
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:45 PM
To: <neo4jclient@googlegroups.com>
Cc: neo4jclient@googlegroups.com
Subject: Re: Test for existence?
The type information only exists in .NET to help us serialize and
deserialize into known models, and to provide IntelliSense through the query
syntax where possible. This information is not in Neo4j. To Neo4j, you just
have property bags.
You can run a Cypher query like this:
START n=node(*)
WHERE n.Id! = 123
RETURN n
But that will read every single node off the disk. Sloooow.
An index is the better way to do this.
How many nodes do you have? 10, 100, 1000, 10000, .?
There's also the CREATE UNIQUE clause in Cypher which will do upsert style
operations. We expose this clause via the wrapper in a simple way, but not a
great way. It needs some polish.
--
Tatham Oddie
Tiny phone keyboard = tiny message
On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net> wrote:
I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:
Public class MyNode
{
Public string Foo { get; set }
}
I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?
So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)
Or you want to check if node 67 exists?
-- Tatham
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?
I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?
Thank you.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Let me clarify. I am using this in the context of populating a Neo4j database from an existing SQL database using Neo4jClient with .NET. Suppose I have 10000 skus and 100 departments. Each of the skus will be 'in' one of the departments. I read the first sku and create a sku node and a department node and create a relation between the two nodes. I read the next sku and since I know that the skus are unique I create a sku node but before I create a new department node I want to see that the department (specified by an number of criteria) eixts as a node or not. Otherwise if I create a department every time I read a new sku in I will have 10000 departments.Ideally I would like to have a method that returns all of the department nodes that meet a certain criteria. If that list count is 0 then the node does not exist. Also I would want to query just the department nodes as if the criteria was limited to just the name of the department then it is possible that a sku name and department name would be the same. I don't want sku nodes returned. Just department nodes. Since I am using Neo4j and you suggest using indexes what would be the call using Neo4jClient to set up that index? How would I set up this 'department query' using Neo4jCLient? Thank you.
On Thursday, November 8, 2012 1:20:41 PM UTC-6, Tatham Oddie wrote:
> So you want to check to see if there’s any node, anywhere in the entire > graph, where Foo == "Bar"? (This will be *terrible* if you have more than > 1000 or so nodes in your graph. You should use an index.)
> Or you want to check if node 67 exists?
> -- Tatham
> *From:* neo4j...@googlegroups.com <javascript:> [mailto:
> neo4j...@googlegroups.com <javascript:>] *On Behalf Of *Kevin Burton
> *Sent:* Friday, 9 November 2012 03:55
> *To:* neo4j...@googlegroups.com <javascript:>
> *Subject:* Test for existence?
> I would like an example on how I can do the simple operation of testing > for a nodes existence? I don't have any references so the test will have to > be based on the values in the node. Is this possible?
> Thank you.
> -- > You received this message because you are subscribed to the Google Groups > "Neo4jClient" group.
> To unsubscribe from this group, send email to > neo4jclient...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.
1. How do I run a Cypher query with neo4jclient (starting with a
GraphClient)?
2. What is the best way to create a node with neo4jclient that has the
same properties as the properties on the .NET model class?
Is this possible with neo4jclient?
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:45 PM
To: <neo4jclient@googlegroups.com>
Cc: neo4jclient@googlegroups.com
Subject: Re: Test for existence?
The type information only exists in .NET to help us serialize and
deserialize into known models, and to provide IntelliSense through the query
syntax where possible. This information is not in Neo4j. To Neo4j, you just
have property bags.
You can run a Cypher query like this:
START n=node(*)
WHERE n.Id! = 123
RETURN n
But that will read every single node off the disk. Sloooow.
An index is the better way to do this.
How many nodes do you have? 10, 100, 1000, 10000, .?
There's also the CREATE UNIQUE clause in Cypher which will do upsert style
operations. We expose this clause via the wrapper in a simple way, but not a
great way. It needs some polish.
--
Tatham Oddie
Tiny phone keyboard = tiny message
On 09/11/2012, at 6:31, "Kevin Burton" <rkevinbur...@charter.net> wrote:
I guess I want the first query. I was hoping that the query would be limited
since I only want to query all of the nodes of a specific type that have in
your words the property 'Foo == Bar'. Say I have the following class:
Public class MyNode
{
Public string Foo { get; set }
}
I run into this situation since our relational database can have many
duplicates and before I create a whole new node I want to know if there are
any nodes with that same value and instead of creating it I want to 'get'
it. Am I thinking about this wrong?
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Tatham Oddie
Sent: Thursday, November 08, 2012 1:19 PM
To: neo4jclient@googlegroups.com
Subject: RE: Test for existence?
So you want to check to see if there's any node, anywhere in the entire
graph, where Foo == "Bar"? (This will be terrible if you have more than 1000
or so nodes in your graph. You should use an index.)
Or you want to check if node 67 exists?
-- Tatham
From: neo4jclient@googlegroups.com [mailto:neo4jclient@googlegroups.com] On
Behalf Of Kevin Burton
Sent: Friday, 9 November 2012 03:55
To: neo4jclient@googlegroups.com
Subject: Test for existence?
I would like an example on how I can do the simple operation of testing for
a nodes existence? I don't have any references so the test will have to be
based on the values in the node. Is this possible?
Thank you.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-- You received this message because you are subscribed to the Google Groups
"Neo4jClient" group.
To unsubscribe from this group, send email to
neo4jclient+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Let me step back. I have a database table that has columns (amoung others) for product id, variant id, and department. There are about 50,000 rows that have unique variant ids and there are about 10 unique departments. So before I create a department node I want to see if that department node exists or not, otherwise I would create 50,000 department nodes. Also I want to make sure that I am only checking for *department* nodes because there the name of the product node may be the same as the department and I don't want to return product nodes when I am querying for department nodes.
There have been several posts on this thread suggesting various Cypher queries but I don't know how to run a Cypher query with Neo4jClient. Also it was suggested that I should use an index. Again I am not sure how to set up an index with Neo4jClient.
On Thursday, November 8, 2012 1:20:41 PM UTC-6, Tatham Oddie wrote:
> So you want to check to see if there’s any node, anywhere in the entire > graph, where Foo == "Bar"? (This will be *terrible* if you have more than > 1000 or so nodes in your graph. You should use an index.)
> Or you want to check if node 67 exists?
> -- Tatham
> *From:* neo4j...@googlegroups.com <javascript:> [mailto:
> neo4j...@googlegroups.com <javascript:>] *On Behalf Of *Kevin Burton
> *Sent:* Friday, 9 November 2012 03:55
> *To:* neo4j...@googlegroups.com <javascript:>
> *Subject:* Test for existence?
> I would like an example on how I can do the simple operation of testing > for a nodes existence? I don't have any references so the test will have to > be based on the values in the node. Is this possible?
> Thank you.
> -- > You received this message because you are subscribed to the Google Groups > "Neo4jClient" group.
> To unsubscribe from this group, send email to > neo4jclient...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/groups/opt_out.