[TEST] non stored fields are not returned anymore via fields
Relates to https://github.com/elastic/elasticsearch/issues/14489 Original commit: elastic/x-pack-elasticsearch@2897dc5df7
This commit is contained in:
parent
7277d280ca
commit
171179d91f
|
@ -42,10 +42,9 @@ public class IndexAuditIT extends ESIntegTestCase {
|
|||
|
||||
assertThat(found, is(true));
|
||||
|
||||
SearchResponse searchResponse = client().prepareSearch(".shield_audit_log*").setQuery(QueryBuilders.matchQuery("principal", USER)).addField("principal").get();
|
||||
SearchResponse searchResponse = client().prepareSearch(".shield_audit_log*").setQuery(QueryBuilders.matchQuery("principal", USER)).get();
|
||||
assertThat(searchResponse.getHits().getHits().length, greaterThan(0));
|
||||
assertThat((String) searchResponse.getHits().getAt(0).field("principal").getValue(), is(USER));
|
||||
|
||||
assertThat((String) searchResponse.getHits().getAt(0).sourceAsMap().get("principal"), is(USER));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue