Implement Equivalent Elasticsearch titan query using Elasticsearch java driver <p>I asked question related to pagination in Elastic Search result fetched by titan here</p> <p><a href="http://stackoverflow.com/questions/22436106/pagination-with-elastic-search-in-titan/22439442?noredirect=1#22439442">Pagination with Elastic Search in Titan</a></p> <p>and concluded that its not supporting right now so to get it I decided to search <code>Titan</code> index directly using ES java client.</p> <p>Here is ths Titan way of fetching ES records:</p> <pre><code>Iterable&lt;Result&lt;Vertex&gt;&gt; vertices = g.indexQuery("search","v.testTitle:(mytext)") .addParameter(new Parameter("from", 0)) .addParameter(new Parameter("size", 2)).vertices(); for (Result&lt;Vertex&gt; result : vertices) { Vertex tv = result.getElement(); System.out.println(tv.getProperty("testTitle")+ ": " + result.getScore()); } </code></pre> <p>Its return 1 record.</p> <p>but addParameter() is not supported so pagination is not allowed. So i wanted to do same thing directly from ES java client as below:</p> <pre><code>Node node = nodeBuilder().node(); Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("127.0.0.1", 9300)); SearchResponse response = client.prepareSearch("titan") .setSearchType(SearchType.DFS_QUERY_THEN_FETCH) .setQuery(QueryBuilders.fieldQuery("testTitle", "mytext")) // Query .execute() .actionGet(); System.out.println(response.getHits().totalHits()); node.close(); </code></pre> <p>Its printing zero in my case. but the same query in Titan code (above) return 1 record. Am I missing some <code>Titan</code> specific parameters or options in this ES java code????</p>