Re: [Neo4j] Neo4j: count the size of array

2018-05-09 Thread Ebtihel Hannachi
it works very well :) thank you

2018-05-09 23:50 GMT+01:00 'Michael Hunger' via Neo4j <
neo4j@googlegroups.com>:

> return filter(x in [10,20,30] where x <> 20)
>
> On Wed, May 9, 2018 at 11:55 PM, Ebtihel Hannachi <
> hannachi.ebti...@gmail.com> wrote:
>
>> I have another question, please!
>> What about if I would like to delete a specific value from an array
>> without knowing the indices of it in the array  (example array[10,20,30)
>> and the result will be [10,30]).
>> any suggestions, please? I'll be so grateful!
>>
>> 2018-05-09 22:47 GMT+01:00 Ebtihel Hannachi :
>>
>>> it worked form me with index !! i really appreciate it :)
>>>
>>> 2018-05-07 10:31 GMT+01:00 'Chris Vest' via Neo4j <
>>> neo4j@googlegroups.com>:
>>>
 If you want this to be a fast thing to query for, you can put the array
 length in a separate property on the nodes, and then create an index for
 it. Then change your queries to be for `v.length = 1`, etc.

 --
 Chris Vest
 System Engineer, Neo Technology


 > On 7 May 2018, at 11.10, 'Michael Hunger' via Neo4j <
 neo4j@googlegroups.com> wrote:
 >
 > Your query looks ok, it could be shortened to:
 >
 > Cypher is case sensitive so perhaps you have a misspelling somewhere?
 >
 > match (v) where size(v.value) = 1 return v.name
 >
 > you can check with
 >
 > match (v) return v.name, size(v.value) limit 20
 >
 >
 > On Sat, May 5, 2018 at 3:56 PM, Ebtihel Hannachi <
 hannachi.ebti...@gmail.com> wrote:
 > Hi,
 > I am new in graph databases and I need your help, please!
 > so I have created a set of nodes, every node has as properties name
 and an array of integers.
 > I would like to know how to get all nodes have only a single
 integer???
 > I tried this query but it gave no results "MATCH (v) WITH
 length(v.value) as size WHERE size=1 RETURN v.name".
 >
 > --
 > 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 neo4j+unsubscr...@googlegroups.com.
 > For more options, visit https://groups.google.com/d/optout.
 >
 >
 > --
 > 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 neo4j+unsubscr...@googlegroups.com.
 > For more options, visit https://groups.google.com/d/optout.

 --
 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 neo4j+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>> --
>> 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 neo4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j: count the size of array

2018-05-09 Thread 'Michael Hunger' via Neo4j
return filter(x in [10,20,30] where x <> 20)

On Wed, May 9, 2018 at 11:55 PM, Ebtihel Hannachi <
hannachi.ebti...@gmail.com> wrote:

> I have another question, please!
> What about if I would like to delete a specific value from an array
> without knowing the indices of it in the array  (example array[10,20,30)
> and the result will be [10,30]).
> any suggestions, please? I'll be so grateful!
>
> 2018-05-09 22:47 GMT+01:00 Ebtihel Hannachi :
>
>> it worked form me with index !! i really appreciate it :)
>>
>> 2018-05-07 10:31 GMT+01:00 'Chris Vest' via Neo4j > >:
>>
>>> If you want this to be a fast thing to query for, you can put the array
>>> length in a separate property on the nodes, and then create an index for
>>> it. Then change your queries to be for `v.length = 1`, etc.
>>>
>>> --
>>> Chris Vest
>>> System Engineer, Neo Technology
>>>
>>>
>>> > On 7 May 2018, at 11.10, 'Michael Hunger' via Neo4j <
>>> neo4j@googlegroups.com> wrote:
>>> >
>>> > Your query looks ok, it could be shortened to:
>>> >
>>> > Cypher is case sensitive so perhaps you have a misspelling somewhere?
>>> >
>>> > match (v) where size(v.value) = 1 return v.name
>>> >
>>> > you can check with
>>> >
>>> > match (v) return v.name, size(v.value) limit 20
>>> >
>>> >
>>> > On Sat, May 5, 2018 at 3:56 PM, Ebtihel Hannachi <
>>> hannachi.ebti...@gmail.com> wrote:
>>> > Hi,
>>> > I am new in graph databases and I need your help, please!
>>> > so I have created a set of nodes, every node has as properties name
>>> and an array of integers.
>>> > I would like to know how to get all nodes have only a single integer???
>>> > I tried this query but it gave no results "MATCH (v) WITH
>>> length(v.value) as size WHERE size=1 RETURN v.name".
>>> >
>>> > --
>>> > 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 neo4j+unsubscr...@googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>> >
>>> >
>>> > --
>>> > 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 neo4j+unsubscr...@googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> 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 neo4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
> --
> 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 neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j: count the size of array

2018-05-09 Thread Ebtihel Hannachi
I have another question, please!
What about if I would like to delete a specific value from an array without
knowing the indices of it in the array  (example array[10,20,30) and the
result will be [10,30]).
any suggestions, please? I'll be so grateful!

2018-05-09 22:47 GMT+01:00 Ebtihel Hannachi :

> it worked form me with index !! i really appreciate it :)
>
> 2018-05-07 10:31 GMT+01:00 'Chris Vest' via Neo4j 
> :
>
>> If you want this to be a fast thing to query for, you can put the array
>> length in a separate property on the nodes, and then create an index for
>> it. Then change your queries to be for `v.length = 1`, etc.
>>
>> --
>> Chris Vest
>> System Engineer, Neo Technology
>>
>>
>> > On 7 May 2018, at 11.10, 'Michael Hunger' via Neo4j <
>> neo4j@googlegroups.com> wrote:
>> >
>> > Your query looks ok, it could be shortened to:
>> >
>> > Cypher is case sensitive so perhaps you have a misspelling somewhere?
>> >
>> > match (v) where size(v.value) = 1 return v.name
>> >
>> > you can check with
>> >
>> > match (v) return v.name, size(v.value) limit 20
>> >
>> >
>> > On Sat, May 5, 2018 at 3:56 PM, Ebtihel Hannachi <
>> hannachi.ebti...@gmail.com> wrote:
>> > Hi,
>> > I am new in graph databases and I need your help, please!
>> > so I have created a set of nodes, every node has as properties name and
>> an array of integers.
>> > I would like to know how to get all nodes have only a single integer???
>> > I tried this query but it gave no results "MATCH (v) WITH
>> length(v.value) as size WHERE size=1 RETURN v.name".
>> >
>> > --
>> > 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 neo4j+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > 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 neo4j+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> 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 neo4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j: count the size of array

2018-05-09 Thread Ebtihel Hannachi
it worked form me with index !! i really appreciate it :)

2018-05-07 10:31 GMT+01:00 'Chris Vest' via Neo4j :

> If you want this to be a fast thing to query for, you can put the array
> length in a separate property on the nodes, and then create an index for
> it. Then change your queries to be for `v.length = 1`, etc.
>
> --
> Chris Vest
> System Engineer, Neo Technology
>
>
> > On 7 May 2018, at 11.10, 'Michael Hunger' via Neo4j <
> neo4j@googlegroups.com> wrote:
> >
> > Your query looks ok, it could be shortened to:
> >
> > Cypher is case sensitive so perhaps you have a misspelling somewhere?
> >
> > match (v) where size(v.value) = 1 return v.name
> >
> > you can check with
> >
> > match (v) return v.name, size(v.value) limit 20
> >
> >
> > On Sat, May 5, 2018 at 3:56 PM, Ebtihel Hannachi <
> hannachi.ebti...@gmail.com> wrote:
> > Hi,
> > I am new in graph databases and I need your help, please!
> > so I have created a set of nodes, every node has as properties name and
> an array of integers.
> > I would like to know how to get all nodes have only a single integer???
> > I tried this query but it gave no results "MATCH (v) WITH
> length(v.value) as size WHERE size=1 RETURN v.name".
> >
> > --
> > 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 neo4j+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > 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 neo4j+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Neo4j] Neo4j: count the size of array

2018-05-07 Thread 'Chris Vest' via Neo4j
If you want this to be a fast thing to query for, you can put the array length 
in a separate property on the nodes, and then create an index for it. Then 
change your queries to be for `v.length = 1`, etc.

--
Chris Vest
System Engineer, Neo Technology


> On 7 May 2018, at 11.10, 'Michael Hunger' via Neo4j  
> wrote:
> 
> Your query looks ok, it could be shortened to:
> 
> Cypher is case sensitive so perhaps you have a misspelling somewhere?
> 
> match (v) where size(v.value) = 1 return v.name
> 
> you can check with
> 
> match (v) return v.name, size(v.value) limit 20
> 
> 
> On Sat, May 5, 2018 at 3:56 PM, Ebtihel Hannachi  
> wrote:
> Hi, 
> I am new in graph databases and I need your help, please!
> so I have created a set of nodes, every node has as properties name and an 
> array of integers.
> I would like to know how to get all nodes have only a single integer???
> I tried this query but it gave no results "MATCH (v) WITH length(v.value) as 
> size WHERE size=1 RETURN v.name".
> 
> -- 
> 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 neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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 neo4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Neo4j: count the size of array

2018-05-07 Thread Ebtihel Hannachi
Hi, 
I am new in graph databases and I need your help, please!
so I have created a set of nodes, every node has as properties name and an 
array of integers.
I would like to know how to get all nodes have only a single integer???
I tried this query but it gave no results "MATCH (v) WITH length(v.value) 
as size WHERE size=1 RETURN v.name".

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.