mirror of https://github.com/apache/lucene.git
SOLR-10731: Add tests for params
This commit is contained in:
parent
cc87181c54
commit
e2284bbedc
|
@ -920,7 +920,6 @@ public class StreamExpressionTest extends SolrCloudTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testKnnStream() throws Exception {
|
||||
|
||||
|
@ -942,6 +941,25 @@ public class StreamExpressionTest extends SolrCloudTestCase {
|
|||
List<Tuple> tuples = getTuples(solrStream);
|
||||
assertTrue(tuples.size() == 3);
|
||||
assertOrder(tuples, 2, 3, 4);
|
||||
|
||||
sParams = new ModifiableSolrParams(StreamingTest.mapParams(CommonParams.QT, "/stream"));
|
||||
sParams.add("expr", "knn(" + COLLECTIONORALIAS + ", id=\"1\", qf=\"a_t\", rows=\"4\", fl=\"id, score\", mintf=\"1\", maxdf=\"0\")");
|
||||
solrStream = new SolrStream(jetty.getBaseUrl().toString() + "/collection1", sParams);
|
||||
tuples = getTuples(solrStream);
|
||||
assertTrue(tuples.size() == 0);
|
||||
|
||||
sParams = new ModifiableSolrParams(StreamingTest.mapParams(CommonParams.QT, "/stream"));
|
||||
sParams.add("expr", "knn(" + COLLECTIONORALIAS + ", id=\"1\", qf=\"a_t\", rows=\"4\", fl=\"id, score\", mintf=\"1\", maxwl=\"1\")");
|
||||
solrStream = new SolrStream(jetty.getBaseUrl().toString() + "/collection1", sParams);
|
||||
tuples = getTuples(solrStream);
|
||||
assertTrue(tuples.size() == 0);
|
||||
|
||||
sParams = new ModifiableSolrParams(StreamingTest.mapParams(CommonParams.QT, "/stream"));
|
||||
sParams.add("expr", "knn(" + COLLECTIONORALIAS + ", id=\"1\", qf=\"a_t\", rows=\"2\", fl=\"id, score\", mintf=\"1\", minwl=\"20\")");
|
||||
solrStream = new SolrStream(jetty.getBaseUrl().toString() + "/collection1", sParams);
|
||||
tuples = getTuples(solrStream);
|
||||
assertTrue(tuples.size() == 0);
|
||||
|
||||
} finally {
|
||||
cache.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue