How does P.test (V value) work in a graph traversal request in Titan?

A script came where I need to write a titan request using GraphTraversal api, which has various clauses, such as, contains, inside, etc.

To form the necessary sentences, I use P.within (..), P.inside (..), P.test (..) etc. predicates. The following is an example of a workaround bypass

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 request? Does it mean all predicates after loading all the vertices in memory?

+4
source share
1 answer

, P.within, ( , field1, Titan ). , , ; , Titan , .

+1

Source: https://habr.com/ru/post/1655834/


All Articles