keep the rescorer builder consistent with other builders, without the use of setters
This commit is contained in:
parent
03fdc6aa80
commit
ad70105c39
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue