[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.


[Neo4j] How to save polygon data in neo4j and query if a latitude and longitude is within the polygon using Java

2018-05-07 Thread hema
Hi,


I am very new to neo4j database. Just started trying out neo4j spatial 
plugin.
Excuse me if my doubts are silly. As it is very new for me facing little 
difficult to start.


I want to save a list of polygon data to neo4j database and then query with 
some latitude and longitude to check whether the location is within the 
polygon.

Link to my question on stackoverflow : 
https://stackoverflow.com/q/50152029/6756805

Any help is greatly thankful.

Hema

-- 
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.


Re: [Neo4j] How to save polygon data in neo4j and query if a latitude and longitude is within the polygon using Java

2018-05-07 Thread 'Michael Hunger' via Neo4j
Please check out William Lyons Blog as a great example:
http://www.lyonwj.com/2016/08/09/neo4j-spatial-procedures-congressional-boundaries/

Cheers, Michael

On Fri, May 4, 2018 at 9:10 AM, hema  wrote:

> Hi,
>
>
> I am very new to neo4j database. Just started trying out neo4j spatial
> plugin.
> Excuse me if my doubts are silly. As it is very new for me facing little
> difficult to start.
>
>
> I want to save a list of polygon data to neo4j database and then query
> with some latitude and longitude to check whether the location is within
> the polygon.
>
> Link to my question on stackoverflow : https://stackoverflow.com/q/
> 50152029/6756805
>
> Any help is greatly thankful.
>
> Hema
>
> --
> 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] How to save polygon data in neo4j and query if a latitude and longitude is within the polygon using Java

2018-05-07 Thread hema
Thank you so much, for your response.

*Please find the attachements*

I want it to be done using Java. I found through some documentation we can 
do it using GraphRepository and SpatialRepository.

I am trying to do using neo4j-spatial dependency.But i am unable to add 
GraphRepository and SpatialRepository to my project. 
I have attached pom.xml of my project .Please help me with this issue.


Regards,

Roja V A


On Monday, May 7, 2018 at 2:42:31 PM UTC+5:30, Michael Hunger wrote:
>
> Please check out William Lyons Blog as a great example: 
> http://www.lyonwj.com/2016/08/09/neo4j-spatial-procedures-congressional-boundaries/
>
> Cheers, Michael
>
> On Fri, May 4, 2018 at 9:10 AM, hema  
> wrote:
>
>> Hi,
>>
>>
>> I am very new to neo4j database. Just started trying out neo4j spatial 
>> plugin.
>> Excuse me if my doubts are silly. As it is very new for me facing little 
>> difficult to start.
>>
>>
>> I want to save a list of polygon data to neo4j database and then query 
>> with some latitude and longitude to check whether the location is within 
>> the polygon.
>>
>> Link to my question on stackoverflow : 
>> https://stackoverflow.com/q/50152029/6756805
>>
>> Any help is greatly thankful.
>>
>> Hema
>>
>> -- 
>> 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+un...@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.


pom.xml
Description: XML document


Re: [Neo4j] How to save polygon data in neo4j and query if a latitude and longitude is within the polygon using Java

2018-05-07 Thread 'Michael Hunger' via Neo4j
That was old code in the 4 year old version of Spring Data Neo4j which is
no longer maintained.

For now you'll have to use the procedures.

It's also better to go with a Neo4j server.

Michael


On Mon, May 7, 2018 at 2:22 PM, hema  wrote:

> Thank you so much, for your response.
>
> *Please find the attachements*
>
> I want it to be done using Java. I found through some documentation we can
> do it using GraphRepository and SpatialRepository.
>
> I am trying to do using neo4j-spatial dependency.But i am unable to add
> GraphRepository and SpatialRepository to my project.
> I have attached pom.xml of my project .Please help me with this issue.
>
>
> Regards,
>
> Roja V A
>
>
> On Monday, May 7, 2018 at 2:42:31 PM UTC+5:30, Michael Hunger wrote:
>>
>> Please check out William Lyons Blog as a great example:
>> http://www.lyonwj.com/2016/08/09/neo4j-spatial-proc
>> edures-congressional-boundaries/
>>
>> Cheers, Michael
>>
>> On Fri, May 4, 2018 at 9:10 AM, hema  wrote:
>>
>>> Hi,
>>>
>>>
>>> I am very new to neo4j database. Just started trying out neo4j spatial
>>> plugin.
>>> Excuse me if my doubts are silly. As it is very new for me facing little
>>> difficult to start.
>>>
>>>
>>> I want to save a list of polygon data to neo4j database and then query
>>> with some latitude and longitude to check whether the location is within
>>> the polygon.
>>>
>>> Link to my question on stackoverflow : https://stackoverflow.com/q/
>>> 50152029/6756805
>>>
>>> Any help is greatly thankful.
>>>
>>> Hema
>>>
>>> --
>>> 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+un...@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.