Orientdb Match Query traverses only 1 level for a given edge classes

I am using Match query to traverse from a given vertex to a destination vertex which is not directly connected but has multiple hops/depth in between.
Query Used:
Select from (Match { class : classname1, as : ci , where :(name=“name”)}.out(){as Relationship}.inV(){class: classname2 , as: targetCi, where:($matched.ci != $currentMatch)} RETURN ci.name as parent_name, relationship.type as rel_type, targetCi.name as child_name , targetCi.@class).

This query gives result back only at level 1 from root vertex . I have tried using .outE() , bothE() but still the result is same.

Can someone help me in traversing from a source vertex (can be complete class or just a vertx in a class) to a destination vertex class. Which is efficient rather than traversing entire graph and filtering the value.