StringAndBytesText text = (StringAndBytesText) o;
assertThat(text.string(), is("bar"));
}
searchResponse = client().prepareSearch()
.setQuery(matchAllQuery())
<BUG>.addSort("nested.foo.sub", SortOrder.DESC)
.execute().actionGet();</BUG>
assertNoFailures(searchResponse);
hits = searchResponse.getHits().hits();
for (int i = 0; i < hits.length; ++i) {

StringAndBytesText text = (StringAndBytesText) o;
assertThat(text.string(), is("bar"));
}
searchResponse = client().prepareSearch()
.setQuery(matchAllQuery())
.addSort(SortBuilders.fieldSort("nested.foo.sub").setNestedPath("nested").order(SortOrder.DESC))
.execute().actionGet();
assertNoFailures(searchResponse);
hits = searchResponse.getHits().hits();
for (int i = 0; i < hits.length; ++i) {
