You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/08/19 23:09:32 UTC
[lucene-solr] branch branch_8x updated: Harden
TestExtendedDismaxParser.testBf
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new ee50c9d Harden TestExtendedDismaxParser.testBf
ee50c9d is described below
commit ee50c9d5acccc413841bd60c7bb1c7662c248c6e
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Mon Aug 19 15:33:19 2019 -0700
Harden TestExtendedDismaxParser.testBf
Eliminate assumption about index order
(cherry picked from commit a12cf2f6d84e55a77d99384602fad464b7e90d80)
---
.../test/org/apache/solr/search/TestExtendedDismaxParser.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
index 72546cc..1f0b569 100644
--- a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
@@ -537,12 +537,13 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {
"//doc[3]/str[@name='id'][.='54']");
// adding value from a field
- // 0 would be returned for negative values
+ // 0 would be returned for negative values or docs w/o a value
assertQ(req("q", "*:*", "qf", "text_sw", "defType", "edismax",
- "bf", "foo_i", "fq", "id:[47 TO 49]", "fl", "id,score"),
- "//doc[1]/str[@name='id'][.='48']",
- "//doc[2]/str[@name='id'][.='47']",
- "//doc[3]/str[@name='id'][.='49']");
+ "bf", "foo_i", "fq", "id:[47 TO 49]", "fl", "id,score"),
+ "//doc[1]/str[@name='id'][.='48']",
+ // these should have identical score, in non-deterministic order
+ "//doc[str[@name='id'][.='47'] and float[@name='score'][.='1.0']]",
+ "//doc[str[@name='id'][.='49'] and float[@name='score'][.='1.0']]");
}
@Test