title: Composite index of edges & property (tinkerpop / orientDB)
body: <p>I have a graph in OrientDB (uses Tinkerpop stack), and need to enable very fast lookups of edge values / properties / fields and edge in/out vertices.</p>
  
  <p>So, basically the user will need to lookup as follows:</p>
  
  <p>SELECT FROM myEdges WHERE inVertex = {VertexIdentity}, outVertex = {VertexIdentity}, property1 = 'xyz'</p>
  
  <p>Essentially it's a composite index for the edge class, of 3 properties: inVertex, outVertex &amp; property1</p>
  
  <p>Basically - if the user already has a VertexIdentity for 2 vertices (maybe, in the form: #CLUSTER_ID:RECORD_ID) - and the the property value (in this case, <code>xyz</code>) - it will allow very fast lookup to see if the combination already exists in the graph (if 2 vertices are linked with property1) - without making a traversal.</p>
  
  <p>So far I found the following code to help with composite indexes, but I cant see if it's possible to include in/out vertices in this (for a graph edge).</p>
  
  <p><a href="https://github.com/orientechnologies/orientdb/blob/master/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectCompositeIndexDirectSearchTest.java" rel="nofollow">https://github.com/orientechnologies/orientdb/blob/master/tests/src/test/java/com/orientechnologies/orient/test/database/auto/SQLSelectCompositeIndexDirectSearchTest.java</a></p>
  
  <p>Is it possible??</p>