In 3.0, which will be released in the near future, we will support indexing on vertex attributes.
For now, you can consider creating vertex types for those attributes. Then connect the original vertexes to the attribute vertexes.
When you run a query, you can directly start from vertex attr1 attr2 attr3 and attr4 having x y z x as their ID and return vertexes that are connected to all of the input attribute vertexes.
I have the same requirement. Please can you provide a sample query for this. How exactly do you code for : return vertexes that are connected to all of the input attribute vertexes ?
For this Query I’m taking the input ID of a person and grabbing all things connected to that person.
You will need to change “Person” for the “Vertex” that you designed.
CREATE QUERY edgeCrawl(VERTEX<Person> name)FOR GRAPH MyGraph {
//Used to accumulate all connections
ListAccum<EDGE> @@connectionList;
start = {name}; //pass name
//From that person's name crawl all edges (notice I didn't specify an edge and left it blank with :e same with :t, by leaving the edge and target vertex blank it will traverse everything)
S1 = SELECT s
FROM start:s -(:e)-> :t
ACCUM @@connectionList += e;
PRINT @@connectionList;
}