client().prepareIndex("test", "type", "1").setSource("term", "1"),
client().prepareIndex("test", "type", "2").setSource("term", "2"),
client().prepareIndex("test", "type", "3").setSource("term", "3"),
client().prepareIndex("test", "type", "4").setSource("term", "4"));
CountResponse countResponse = client().prepareCount("test")
.setQuery(filteredQuery(matchAllQuery(), termsLookupFilter("term").lookupIndex("lookup").lookupType("type").lookupId("1").lookupPath("terms"))).get();
assertHitCount(countResponse, 2l);
// same as above, just on the _id...
countResponse = client().prepareCount("test")