Hi Jim,

I have a tree which level0 are vertices, level 1 are edges, level2 are 
polygons, etc, 
Elements on level 0 are only connected to elements in level 1, level 1 to 2 
(i.e., the 
graph relationships). 

1- In this case, shall I add only vertices (with coordinates) to the 
spatial index or add 
all objects in level 1, level 2, etc too? later I have query like 
subsetting, i.e., having a 
bounding box I want to see for instance all polygons inside it, etc. 

2- Do I need to build other type of neo4j indexes i.e., non spatial indexes?

Thanks,
Best,
Alireza 
 


On Friday, July 18, 2014 3:25:15 PM UTC+2, Jim Biard wrote:
>
> Alireza,
>
> These questions are so broad that it's hard to answer.
>
> If you want to be able to get all of your different nodes back from a 
> single query, then they must all be in the same RTree layer (accessed 
> through a spatial index in Cypher). If different kinds or subsets of 
> spatial nodes are to be queried separately, then you need a different layer 
> (and thus different spatial index for Cypher-based queries) for each 
> separate type or subset. It also depends on the type of geometry you are 
> using. There are three types of geometries - WKB, WKT, and simple point, 
> and you cannot mix these within a layer.
>
> As for "normal" indexes, it all depends on what you are trying to do. I 
> can't answer this question, except to say that indexing (some of which is 
> done transparently if you are using labels) will generally increase 
> performance.
>
> Grace and peace,
>
> Jim
>
> On Friday, July 18, 2014 4:04:32 AM UTC-4, Alireza Rezaei Mahdiraji wrote:
>>
>>
>> Hi All, 
>>
>> Assuming a graph which has 3 to four kind of spatial nodes (e.g., point, 
>> line, polygon), how many and what type of  
>> spatial indexes I should build on this graph? How about normal indexes? 
>> Do I need them too? 
>> Is there any general guideline on indexing w.r.t. performance? 
>>
>>
>> Best,
>> Alireza
>>  
>>
>>
>>
>>

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

Reply via email to