public void testSearchIntoWithoutSource() {
esSetup.execute(createIndex("test").withMapping("a",
"{\"a\":{\"_source\": {\"enabled\": false}}}"));
esSetup.execute(index("test", "a", "1").withSource("{\"name\": \"John\"}"));
SearchIntoRequest request = new SearchIntoRequest("test");
request.source("{\"fields\": [\"_id\", \"_source\", [\"_index\", \"'newindex'\"]]}");
SearchIntoResponse res = esSetup.client().execute(SearchIntoAction.INSTANCE, request).actionGet();
assertEquals(1, res.getFailedShards());
assertTrue(res.getShardFailures()[0].reason().contains("Parse Failure [The _source field of index test and type a is not stored.]"));
}