You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2023/09/01 14:45:51 UTC

[solr] 02/02: NO JIRA: add TestFieldValueFeature.testBooleanValue_docValues() case (#1881)

This is an automated email from the ASF dual-hosted git repository.

cpoerschke pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 1a56cf17a6d20a424e5355877cf6e1b9242a3727
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Fri Sep 1 15:38:03 2023 +0100

    NO JIRA: add TestFieldValueFeature.testBooleanValue_docValues() case (#1881)
    
    (cherry picked from commit 09ee485d80e94594e25884b987736dce6f017006)
---
 .../apache/solr/ltr/feature/TestFieldValueFeature.java    | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java
index 8123d8ce382..5f102fb67a1 100644
--- a/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java
+++ b/solr/modules/ltr/src/test/org/apache/solr/ltr/feature/TestFieldValueFeature.java
@@ -407,8 +407,21 @@ public class TestFieldValueFeature extends TestRerankBase {
 
   @Test
   public void testBooleanValue() throws Exception {
+    implTestBooleanValue("isTrendy");
+  }
+
+  @Test
+  public void testBooleanValue_docValues() throws Exception {
+    implTestBooleanValue("dvIsTrendy");
+  }
+
+  private void implTestBooleanValue(String isTrendyFieldName) throws Exception {
     final String fstore = "test_boolean_store";
-    loadFeature("trendy", FieldValueFeature.class.getName(), fstore, "{\"field\":\"isTrendy\"}");
+    loadFeature(
+        "trendy",
+        FieldValueFeature.class.getName(),
+        fstore,
+        "{\"field\":\"" + isTrendyFieldName + "\"}");
 
     loadModel(
         "trendy-model",