Some more data points..

Here is the code snippet..

                console.log('BEFORE ..' + node.type);
                console.log(node);
               db.insertNode(node,function(err, node){
                   if(err){
                        cb("Error while inserting ",{data: err});
                        throw err;
                   }else{
                        console.log('AFTER..' + node.type);
                        console.log(node);
                        insertIndex (node, index_name, cb);
                   }
               });

I see that the ID I get back has a NaN (after inserting node).


Here is the console log:

2013-12-26T07:26:57.026340+00:00 app[web.1]: { name: 'test1',
2013-12-26T07:26:57.026340+00:00 app[web.1]:   type: 'test_category',
2013-12-26T07:26:57.026340+00:00 app[web.1]:   cr_date: 
'2013-12-26T07:26:57.020Z',
2013-12-26T07:26:57.026340+00:00 app[web.1]:   last_upd: 
'2013-12-26T07:26:57.020Z' }
2013-12-26T07:26:57.051993+00:00 app[web.1]:AFTER ..test_category

2013-12-26T07:26:57.054481+00:00 app[web.1]: { name: 'test1',
2013-12-26T07:26:57.054481+00:00 app[web.1]:   last_upd: 
'2013-12-26T07:26:57.020Z',
2013-12-26T07:26:57.054481+00:00 app[web.1]:   cr_date: 
'2013-12-26T07:26:57.020Z',
2013-12-26T07:26:57.054481+00:00 app[web.1]:   type: 'test_category',
2013-12-26T07:26:57.054481+00:00 app[web.1]:   _id: NaN }


When I query graphenedb, I see that I get a ID for query ..

start n = node:global_category_index('name:"test1" AND type:"test_category" 
')

I get, "id":"69134"

Could this be due to any other issue? I am using Neo4j 2.0.0 version. 

- Shekar

On Wednesday, 25 December 2013 22:56:13 UTC-8, Shekar Tippur wrote:
>
> Michael,
>
> Dug up further,
>
> start n = node:global_category_index('name:"test" AND type:"test_category" 
> ') return n
>
> I am running this query and looks like it is returning 
>
> 2013-12-26T06:47:27.168442+00:00 app[web.1]: { columns: [ 'n' ],
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:   data: 
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:    [ { name: 'test',
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:        last_upd: 
> '2013-12-24T19:01:52.904Z',
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:        cr_date: 
> '2013-12-24T19:01:52.904Z',
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:        type: 'test_category',
> 2013-12-26T06:47:27.168442+00:00 app[web.1]:        _id: NaN } ] }
>
> When I run the same directly on graphenedb, I see that I get an 
> id "id":"69134"
>
> - Shekar
>
>
>
>
> On Tuesday, 24 December 2013 14:19:20 UTC-8, Michael Hunger wrote:
>>
>> What is the data in "node" initially and later. Or better use two 
>> different variable names.
>>
>>
>>                db.insertNode(data,function(err, result){
>>                    if(err){
>>                         cb("Error while inserting ",{data: err});
>>                         throw err;
>>                    }else{
>>                         console.log('Inserting node index ..' + 
>> result.type);
>>                         console.log(data,result); // This is where I see 
>> NaN 
>>                         insertIndex (result, index_name, cb);
>>                    }
>>                });
>>
>>
>>
>> Am 24.12.2013 um 17:39 schrieb Shekar Tippur <[email protected]>:
>>
>> Here is a small snippet.
>>
>>                db.insertNode(node,function(err, node){
>>                    if(err){
>>                         cb("Error while inserting ",{data: err});
>>                         throw err;
>>                    }else{
>>                         //console.log('Inserting node index ..' + 
>> node.type);
>>                         console.log(node); // This is where I see NaN
>>                         insertIndex (node, index_name, cb);
>>                    }
>>                });
>>
>> - Shekar
>>
>>
>> On Monday, 23 December 2013 23:05:13 UTC-8, Peter Neubauer wrote:
>>>
>>> Do you have some code, or a small test that we can look at, showing this 
>>> behavior? 
>>>
>>> /peter
>>>
>>> (snt)-[:frm]->(phn) 
>>> On Dec 24, 2013 6:58 AM, "Shekar Tippur" <[email protected]> wrote:
>>>
>>>> Hello,
>>>>
>>>> I just pointed the neo4j instance to graphenedb.
>>>>
>>>> 2013-12-23T23:10:16.546863+00:00 app[web.1]: { name: 'test',
>>>> 2013-12-23T23:10:16.546863+00:00 app[web.1]:   last_upd: 
>>>> '2013-12-23T23:10:16.526Z',
>>>> 2013-12-23T23:10:16.546863+00:00 app[web.1]:   cr_date: 
>>>> '2013-12-23T23:10:16.526Z',
>>>> 2013-12-23T23:10:16.546863+00:00 app[web.1]:   type: 'test_category',
>>>> 2013-12-23T23:10:16.546863+00:00 app[web.1]:   _id: NaN }
>>>>
>>>>
>>>> As we can, ID is still _id and the valus is NaN. I am using node-neo4j 
>>>> module to insert node. Not sure what I am doing wrong.
>>>>
>>>> - Shekar
>>>>
>>>> -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Neo4j" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to