This is an automated email from the ASF dual-hosted git repository. dweiss pushed a commit to branch jira/solr-13105-toMerge in repository https://gitbox.apache.org/repos/asf/solr.git
commit a3058a0c6e12d9f1857d4138023f3a118f538ae1 Author: Florin Babes <[email protected]> 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 <[email protected]> Co-authored-by: Christine Poerschke <[email protected]> --- .../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"); + } }
