PercolateResponse percolate = client.preparePercolate("test", "type1").setSource(jsonBuilder().startObject().startObject("doc")
.field("field1", "value1")
.endObject().endObject())
.execute().actionGet();
assertThat(percolate.matches().size(), equalTo(1));
assertThat(percolate.matches(), hasItem("kuku"));
percolate = client.preparePercolate("test", "type1").setSource(jsonBuilder().startObject().startObject("doc").startObject("type1")
.field("field1", "value2")
.endObject().endObject().endObject())