OrientDB 2.0RC1
I have defined two vertices Building (having one property "name" with 
unique index) and Element (having one property "type" with non unique 
index),Building having one-2-many relations to Elements defined as 
lightweight edge (B2E) from Building to Element.
 
To find a specific type of element inside a building I have the following 
queries defined:-

Query1: Navigating from Building to Element
*select expand(out()[type='elementKey1']) from Building where 
name='buildingKey1'*

Query2: Navigating from Element to Building
*select from Element where in_B2E contains (name ='buildingKey') and type = 
'elementKey1'*

Query1:Index on Building.name getting used,*but not the index defined on 
Element.type*
Query2:Index on Element.type getting used, *but not the index defined on 
Building.name*
Shouldn't the above queries use both Building.name and Element.type indexes 
to filter the result?
If I have 10 Buildings and each building has 10000 elements, whats the best 
query to find a specific element type in a building without having to 
iterate sequentially on both Building and Element?
Thanks
Sajal

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" 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/d/optout.

Reply via email to