Skip to content

Commit 1b37144

Browse files
committed
adapt TestFunctionQuery
1 parent c665ed0 commit 1b37144

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,16 @@ public void testGeneral() throws Exception {
389389
// superman has a higher df (thus lower idf) in one segment, but reversed in the complete index
390390
String q ="{!func}query($qq)";
391391
String fq="id:120";
392-
assertQ(req("fl","*,score","q", q, "qq","text:batman", "fq",fq), "//float[@name='score']<'1.0'");
393-
assertQ(req("fl","*,score","q", q, "qq","text:superman", "fq",fq), "//float[@name='score']>'1.0'");
392+
assertQ(req("fl","*,score","q", q, "qq","text:batman", "fq",fq), "//float[@name='score']<'0.6'");
393+
assertQ(req("fl","*,score","q", q, "qq","text:superman", "fq",fq), "//float[@name='score']>'0.6'");
394394

395395
// test weighting through a function range query
396-
assertQ(req("fl","*,score", "fq",fq, "q", "{!frange l=1 u=10}query($qq)", "qq","text:superman"), "//*[@numFound='1']");
396+
assertQ(req("fl","*,score", "fq",fq, "q", "{!frange l=0.6 u=10}query($qq)", "qq","text:superman"), "//*[@numFound='1']");
397397

398398
// test weighting through a complex function
399399
q ="{!func}sub(div(sum(0.0,product(1,query($qq))),1),0)";
400-
assertQ(req("fl","*,score","q", q, "qq","text:batman", "fq",fq), "//float[@name='score']<'1.0'");
401-
assertQ(req("fl","*,score","q", q, "qq","text:superman", "fq",fq), "//float[@name='score']>'1.0'");
400+
assertQ(req("fl","*,score","q", q, "qq","text:batman", "fq",fq), "//float[@name='score']<'0.6'");
401+
assertQ(req("fl","*,score","q", q, "qq","text:superman", "fq",fq), "//float[@name='score']>'0.6'");
402402

403403

404404
// test full param dereferencing

0 commit comments

Comments
 (0)