You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2021/01/22 14:29:58 UTC
[lucene-solr] 01/02: SOLR-15071: add
TestEdisMaxSolrFeature.testEdisMaxSolrFeatureCustomMM() test case (#2201)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch branch_8_8
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit e2e375c397701b6bd3d5c55f7e48bc3dc465f9ee
Author: Florin Babes <ho...@users.noreply.github.com>
AuthorDate: Thu Jan 14 12:44:26 2021 +0200
SOLR-15071: add TestEdisMaxSolrFeature.testEdisMaxSolrFeatureCustomMM() test case (#2201)
* add test case for SOLR-15071
* add temporary @Ignore to be removed when the fix is committed
Co-authored-by: Florin Babes <fl...@emag.ro>
Co-authored-by: Christine Poerschke <cp...@apache.org>
---
.../solr/ltr/feature/TestEdisMaxSolrFeature.java | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestEdisMaxSolrFeature.java b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestEdisMaxSolrFeature.java
index e162c8c..f9401eb 100644
--- a/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestEdisMaxSolrFeature.java
+++ b/solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/TestEdisMaxSolrFeature.java
@@ -21,6 +21,7 @@ import org.apache.solr.ltr.TestRerankBase;
import org.apache.solr.ltr.model.LinearModel;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
public class TestEdisMaxSolrFeature extends TestRerankBase {
@@ -73,4 +74,24 @@ public class TestEdisMaxSolrFeature extends TestRerankBase {
restTestHarness.query("/query" + query.toQueryString());
assertJQ("/query" + query.toQueryString(), "/response/numFound/==4");
}
+
+ @Ignore("SOLR-15071")
+ @Test
+ public void testEdisMaxSolrFeatureCustomMM() throws Exception {
+ loadFeature(
+ "SomeEdisMaxMM1",
+ SolrFeature.class.getName(),
+ "{\"q\":\"{!edismax qf='title' mm=1}${term}\"}");
+ loadFeature(
+ "SomeEdisMaxMM5",
+ SolrFeature.class.getName(),
+ "{\"q\":\"{!edismax qf='title' mm=5}${term}\"}");
+
+ final SolrQuery query = new SolrQuery();
+ query.setQuery("title:w1 w2 w3 w4 w5 w6 w7 w8");
+ query.add("fl", "*,features:[fv store=test efi.term=\"w1 w2 w3 w4 w5 w6 w7 w8\"]");
+
+ restTestHarness.query("/query" + query.toQueryString());
+ assertJQ("/query" + query.toQueryString(), "/response/numFound/==4");
+ }
}