@Test
    public void g_call_search() {
        /*
         * Search via Map (static parameters).
         */
        assertEquals("[path[vp[name->marko], v[1]]]", toResultString(

            g.call("tinker.search", asMap("search", "mar"))
                .element().path()

        ));

        /*
         * Search via Traversal<Map> (dynamic parameters)
         */
        assertEquals("[path[vp[name->vadas], v[2]]]", toResultString(

            g.call("tinker.search", (Traversal) __.project("search").by(V(2).values("name")))
                .element().path()

        ));

        /*
         * Search via .with(String, Traversal) (dynamic parameters)
         */
        assertArrayEquals(new String[] {
                "path[vp[age->29], v[1]]",
                "path[vp[age->27], v[2]]",
                "path[vp[age->32], v[4]]",
                "path[p[weight->0.2], e[12][6-created->3]]"
                }, toResultStrings(

            g.call("tinker.search").with("search", __.constant("2"))
                .element().path()

        ));

        /*
         * Search via .with(String, Traversal) (dynamic parameters)
         */
        assertArrayEquals(new String[] {
                "path[vp[age->29], v[1]]",
                "path[vp[age->27], v[2]]",
                "path[vp[age->32], v[4]]",
        }, toResultStrings(

                g.call("tinker.search").with("search", __.constant("2")).with("type", "Vertex")
                        .element().path()

        ));

    }
Demonstrate / test the full text search service.
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphServiceTest.java