[TEST]: remove field_value_factor , was only added 1.2

This commit is contained in:
Britta Weber 2014-09-01 14:10:09 +02:00
parent 40d86a630b
commit 889db1c824
1 changed files with 2 additions and 6 deletions

View File

@ -59,9 +59,6 @@ public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwa
.startObject("loc") .startObject("loc")
.field("type", "geo_point") .field("type", "geo_point")
.endObject() .endObject()
.startObject("popularity")
.field("type", "float")
.endObject()
.endObject() .endObject()
.endObject() .endObject()
.endObject())); .endObject()));
@ -76,12 +73,11 @@ public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwa
.setType("type1").setId(id).setIndex("test") .setType("type1").setId(id).setIndex("test")
.setSource( .setSource(
jsonBuilder().startObject() jsonBuilder().startObject()
.field("text", "value") .field("text", "value " + (i < 5 ? "boosted" : ""))
.startObject("loc") .startObject("loc")
.field("lat", 10 + i) .field("lat", 10 + i)
.field("lon", 20) .field("lon", 20)
.endObject() .endObject()
.field("popularity", 2.71828)
.endObject())); .endObject()));
ids[i] = id; ids[i] = id;
} }
@ -106,8 +102,8 @@ public class FunctionScoreBackwardCompatibilityTests extends ElasticsearchBackwa
searchSource().query( searchSource().query(
functionScoreQuery(termFilter("text", "value")) functionScoreQuery(termFilter("text", "value"))
.add(gaussDecayFunction("loc", new GeoPoint(10, 20), "1000km")) .add(gaussDecayFunction("loc", new GeoPoint(10, 20), "1000km"))
.add(fieldValueFactorFunction("popularity").modifier(FieldValueFactorFunction.Modifier.LN))
.add(scriptFunction("_index['text']['value'].tf()")) .add(scriptFunction("_index['text']['value'].tf()"))
.add(termFilter("text", "boosted"), factorFunction(5))
))).actionGet(); ))).actionGet();
assertSearchResponse(response); assertSearchResponse(response);
assertOrderedSearchHits(response, ids); assertOrderedSearchHits(response, ids);