Skip to content

Commit

Permalink
Merge branch 'master' into refactor_pluginservice
Browse files Browse the repository at this point in the history
  • Loading branch information
rmuir committed Jul 22, 2015
2 parents 3511a9c + 828d8c7 commit 9453c41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ public double apply(double n) {

@Override
public String toString() {
if (this == NONE) {
return "";
}
return super.toString().toLowerCase(Locale.ROOT);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ public void testFieldValueFactor() throws IOException {
.get();
assertOrderedSearchHits(response, "2", "1");

// try again, but this time explicitly use the do-nothing modifier
response = client().prepareSearch("test")
.setExplain(randomBoolean())
.setQuery(functionScoreQuery(simpleQueryStringQuery("foo"),
fieldValueFactorFunction("test").modifier(FieldValueFactorFunction.Modifier.NONE)))
.get();
assertOrderedSearchHits(response, "2", "1");

// document 1 scores higher because 1/5 > 1/17
response = client().prepareSearch("test")
.setExplain(randomBoolean())
Expand Down

0 comments on commit 9453c41

Please sign in to comment.