@@ -35,29 +35,29 @@ public class RescoreVectorBuilder implements Writeable, ToXContentObject {
3535 }
3636
3737 // Oversample is required as of now as it is the only field in the rescore vector
38- private final float numCandidatesFactor ;
38+ private final float oversample ;
3939
4040 public RescoreVectorBuilder (float numCandidatesFactor ) {
4141 Objects .requireNonNull (numCandidatesFactor , "[" + OVERSAMPLE_FIELD .getPreferredName () + "] must be set" );
4242 if (numCandidatesFactor < MIN_OVERSAMPLE ) {
4343 throw new IllegalArgumentException ("[" + OVERSAMPLE_FIELD .getPreferredName () + "] must be >= " + MIN_OVERSAMPLE );
4444 }
45- this .numCandidatesFactor = numCandidatesFactor ;
45+ this .oversample = numCandidatesFactor ;
4646 }
4747
4848 public RescoreVectorBuilder (StreamInput in ) throws IOException {
49- this .numCandidatesFactor = in .readFloat ();
49+ this .oversample = in .readFloat ();
5050 }
5151
5252 @ Override
5353 public void writeTo (StreamOutput out ) throws IOException {
54- out .writeFloat (numCandidatesFactor );
54+ out .writeFloat (oversample );
5555 }
5656
5757 @ Override
5858 public XContentBuilder toXContent (XContentBuilder builder , Params params ) throws IOException {
5959 builder .startObject ();
60- builder .field (OVERSAMPLE_FIELD .getPreferredName (), numCandidatesFactor );
60+ builder .field (OVERSAMPLE_FIELD .getPreferredName (), oversample );
6161 builder .endObject ();
6262 return builder ;
6363 }
@@ -71,15 +71,15 @@ public boolean equals(Object o) {
7171 if (this == o ) return true ;
7272 if (o == null || getClass () != o .getClass ()) return false ;
7373 RescoreVectorBuilder that = (RescoreVectorBuilder ) o ;
74- return Objects .equals (numCandidatesFactor , that .numCandidatesFactor );
74+ return Objects .equals (oversample , that .oversample );
7575 }
7676
7777 @ Override
7878 public int hashCode () {
79- return Objects .hashCode (numCandidatesFactor );
79+ return Objects .hashCode (oversample );
8080 }
8181
82- public float overesample () {
83- return numCandidatesFactor ;
82+ public float oversample () {
83+ return oversample ;
8484 }
8585}
0 commit comments