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/14 15:44:36 UTC
[lucene-solr] branch branch_8x updated: 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_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 ed89eae SOLR-15071: add TestEdisMaxSolrFeature.testEdisMaxSolrFeatureCustomMM() test case (#2201)
ed89eae is described below
commit ed89eae3e7ad6f952ebda0d22f5aeb268894aa5d
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");
+ }
}