From ecb01c15b9a6645f22f153eb099a377e70e398c8 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 8 Feb 2017 14:40:08 +0100 Subject: Fold InternalSearchHits and friends into their interfaces (#23042) We have a bunch of interfaces that have only a single implementation for 6 years now. These interfaces are pretty useless from a SW development perspective and only add unnecessary abstractions. They also require lots of casting in many places where we expect that there is only one concrete implementation. This change removes the interfaces, makes all of the classes final and removes the duplicate `foo` `getFoo` accessors in favor of `getFoo` from these classes. --- .../java/org/elasticsearch/search/profile/query/QueryProfilerIT.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core/src/test/java/org/elasticsearch/search/profile') diff --git a/core/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java b/core/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java index b6935f021d..f20c575f0b 100644 --- a/core/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java +++ b/core/src/test/java/org/elasticsearch/search/profile/query/QueryProfilerIT.java @@ -31,7 +31,6 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.profile.ProfileResult; import org.elasticsearch.search.profile.ProfileShardResult; -import org.elasticsearch.search.profile.query.CollectorResult; import org.elasticsearch.search.sort.SortOrder; import org.elasticsearch.test.ESIntegTestCase; @@ -164,8 +163,8 @@ public class QueryProfilerIT extends ESIntegTestCase { } assertThat( - "Profile totalHits of [" + profileResponse.getHits().totalHits() + "] is not close to Vanilla totalHits [" - + vanillaResponse.getHits().totalHits() + "]", + "Profile totalHits of [" + profileResponse.getHits().getTotalHits() + "] is not close to Vanilla totalHits [" + + vanillaResponse.getHits().getTotalHits() + "]", vanillaResponse.getHits().getTotalHits(), equalTo(profileResponse.getHits().getTotalHits())); SearchHit[] vanillaHits = vanillaResponse.getHits().getHits(); -- cgit v1.2.3