keep the rescorer builder consistent with other builders, without the use of setters

This commit is contained in:
Shay Banon 2013-02-22 14:06:39 +01:00
parent 03fdc6aa80
commit ad70105c39
2 changed files with 4 additions and 4 deletions

View File

@ -665,12 +665,12 @@ public class SearchRequestBuilder extends ActionRequestBuilder<SearchRequest, Se
} }
public SearchRequestBuilder setRescorer(RescoreBuilder.Rescorer rescorer) { public SearchRequestBuilder setRescorer(RescoreBuilder.Rescorer rescorer) {
rescoreBuilder().setRescorer(rescorer); rescoreBuilder().rescorer(rescorer);
return this; return this;
} }
public SearchRequestBuilder setRescoreWindow(int window) { public SearchRequestBuilder setRescoreWindow(int window) {
rescoreBuilder().setWindowSize(window); rescoreBuilder().windowSize(window);
return this; return this;
} }

View File

@ -37,12 +37,12 @@ public class RescoreBuilder implements ToXContent {
return new QueryRescorer(queryBuilder); return new QueryRescorer(queryBuilder);
} }
public RescoreBuilder setRescorer(Rescorer rescorer) { public RescoreBuilder rescorer(Rescorer rescorer) {
this.rescorer = rescorer; this.rescorer = rescorer;
return this; return this;
} }
public RescoreBuilder setWindowSize(int windowSize) { public RescoreBuilder windowSize(int windowSize) {
this.windowSize = windowSize; this.windowSize = windowSize;
return this; return this;
} }