From 9cb7505ccdc58dcfaa341a9c54eee60d2d16531e Mon Sep 17 00:00:00 2001 From: Haavard Date: Thu, 23 Feb 2017 15:13:44 +0000 Subject: lazy evaluate ranking expressions --- searchlib/src/tests/features/prod_features_attributematch.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'searchlib/src/tests/features/prod_features_attributematch.cpp') diff --git a/searchlib/src/tests/features/prod_features_attributematch.cpp b/searchlib/src/tests/features/prod_features_attributematch.cpp index 06b2b859709..fc69061b4ef 100644 --- a/searchlib/src/tests/features/prod_features_attributematch.cpp +++ b/searchlib/src/tests/features/prod_features_attributematch.cpp @@ -234,6 +234,10 @@ Test::testAttributeMatch() mdb->apply(1); exp.clear(). addScore("attributeMatch(wsint).fieldCompleteness", 0.5f); + { // reset lazy evaluation + RankResult dummy; + ft.executeOnly(dummy, 0); + } ASSERT_TRUE(ft.execute(exp)); // test that normalized values lies in the interval [0,1]. @@ -243,6 +247,10 @@ Test::testAttributeMatch() exp.clear(). addScore("attributeMatch(wsfloat).normalizedWeight", 1). addScore("attributeMatch(wsfloat).normalizedWeightedWeight", 1); + { // reset lazy evaluation + RankResult dummy; + ft.executeOnly(dummy, 0); + } ASSERT_TRUE(ft.execute(exp)); } -- cgit v1.2.3