SOLR-10815: avoid long->float precision loss in 'product(-1,ms(date_field)' by subtracting a base date: 'product(-1,ms(date_field,base_date_field))'

This commit is contained in:
Steve Rowe 2017-06-06 14:23:51 -04:00
parent d276acfbbc
commit 98e103731f
1 changed files with 1 additions and 1 deletions

View File

@ -2761,7 +2761,7 @@ public class TestPointFields extends SolrTestCaseJ4 {
}
assertU(commit());
assertTrue(h.getCore().getLatestSchema().getField(field).getType() instanceof DatePointField);
assertQ(req("q", "*:*", "fl", "id, " + field, "sort", "product(-1,ms(" + field + ")) asc"),
assertQ(req("q", "*:*", "fl", "id, " + field, "sort", "product(-1,ms(" + field + "," + baseDate +")) asc"),
"//*[@numFound='10']",
"//result/doc[1]/date[@name='" + field + "'][.='1995-01-10T10:59:20Z']",
"//result/doc[2]/date[@name='" + field + "'][.='1995-01-10T10:59:19Z']",