This commit is contained in:
Britta Weber 2015-07-26 22:54:10 +02:00
parent 5f0f66908e
commit df339f4cb9
1 changed files with 2 additions and 7 deletions

View File

@ -86,13 +86,8 @@ public class FetchPhase implements SearchPhase {
@Inject
public FetchPhase(Set<FetchSubPhase> fetchSubPhases, InnerHitsFetchSubPhase innerHitsFetchSubPhase) {
innerHitsFetchSubPhase.setFetchPhase(this);
this.fetchSubPhases = new FetchSubPhase[fetchSubPhases.size() + 1];
int counter = 0;
for (FetchSubPhase phase : fetchSubPhases) {
this.fetchSubPhases[counter] = phase;
counter++;
}
this.fetchSubPhases[counter] = innerHitsFetchSubPhase;
this.fetchSubPhases = fetchSubPhases.toArray(new FetchSubPhase[fetchSubPhases.size() + 1]);
this.fetchSubPhases[fetchSubPhases.size()] = innerHitsFetchSubPhase;
}
@Override