Came across a scenario where I need to write a titan query using GraphTraversal api which has various clauses like in, contains, within etc.
To form the required clauses I am utilising P.within(..), P.inside(..), P.test(..) etc. predicates. Following is an illustration of traversal instance
traversal.has("field1", P.within(new String[]{"value1", "value2"})).
has("field2", P.test((r1, r2) -> {
return ((String)r1)).contains((String)r2));
}, "someVal"));
I want to understand how Titan internally evaluates this query? Does it evaluates all predicates after loading all vertices in memory?