Skip to content

Commit

Permalink
tieBreaker in MultiMatchQueryBuilder should be a float, not an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
clintongormley committed Mar 13, 2013
1 parent bea18d9 commit 93ca6e2
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ public class MultiMatchQueryBuilder extends BaseQueryBuilder implements Boostabl

private Boolean useDisMax;

private Integer tieBreaker;
private Float tieBreaker;

private Boolean lenient;

private Float cutoffFrequency = null;

/**
* Constructs a new text query.
*/
Expand Down Expand Up @@ -181,7 +181,7 @@ public MultiMatchQueryBuilder useDisMax(Boolean useDisMax) {
return this;
}

public MultiMatchQueryBuilder tieBreaker(Integer tieBreaker) {
public MultiMatchQueryBuilder tieBreaker(Float tieBreaker) {
this.tieBreaker = tieBreaker;
return this;
}
Expand All @@ -193,8 +193,8 @@ public MultiMatchQueryBuilder lenient(boolean lenient) {
this.lenient = lenient;
return this;
}


/**
* Set a cutoff value in [0..1] (or absolute number >=1) representing the
* maximum threshold of a terms document frequency to be considered a low
Expand Down Expand Up @@ -268,7 +268,7 @@ public void doXContent(XContentBuilder builder, Params params) throws IOExceptio
if (lenient != null) {
builder.field("lenient", lenient);
}

if (cutoffFrequency != null) {
builder.field("cutoff_frequency", cutoffFrequency);
}
Expand Down

0 comments on commit 93ca6e2

Please sign in to comment.