Skip to content

Commit

Permalink
feat: add 'enableReRanking' query parameter (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
aallam authored Jan 6, 2022
1 parent e01f30f commit f41e062
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,15 @@ public T setRelevancyStrictness(Integer relevancyStrictness) {
return getThis();
}

public Boolean getEnableReRanking() {
return enableReRanking;
}

public T setEnableReRanking(Boolean enableReRanking) {
this.enableReRanking = enableReRanking;
return getThis();
}

public String toParam() {
return QueryStringUtils.buildQueryAsQueryParams(this);
}
Expand Down Expand Up @@ -709,6 +718,7 @@ public String toParam() {
protected Boolean percentileComputation;
protected List<String> queryLanguages;
protected Boolean decompoundQuery;
protected Boolean enableReRanking;

/* attributes */
protected List<String> attributesToRetrieve;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,12 @@ void queryWithDistinct() {
assertThat(query.toParam()).isEqualTo("query=&distinct=0");
}

@Test
void queryWitEnabledReRanking() {
Query query = new Query("").setEnableReRanking(false);
assertThat(query.toParam()).isEqualTo("enableReRanking=false&query=");
}

@Test
void queryWithMultipleParams() {
Query query =
Expand Down

0 comments on commit f41e062

Please sign in to comment.