lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbern...@apache.org
Subject [2/6] lucene-solr:master: SOLR-9193: Added terms.limit and distrib=true params to /terms request
Date Wed, 06 Jul 2016 18:58:11 GMT
SOLR-9193: Added terms.limit and distrib=true params to /terms request


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c4734419
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c4734419
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c4734419

Branch: refs/heads/master
Commit: c47344195860750cb5758c1cf1f43b8c26cd3260
Parents: 12741cc
Author: jbernste <jbernste@apache.org>
Authored: Tue Jul 5 20:33:58 2016 -0400
Committer: jbernste <jbernste@apache.org>
Committed: Wed Jul 6 14:06:38 2016 -0400

----------------------------------------------------------------------
 .../apache/solr/client/solrj/io/stream/ScoreNodesStream.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c4734419/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java
index 814b69c..9f61baa 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ScoreNodesStream.java
@@ -35,7 +35,6 @@ import org.apache.solr.client.solrj.io.stream.expr.Expressible;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExplanation;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionNamedParameter;
-import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionValue;
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.common.params.CommonParams;
@@ -48,10 +47,10 @@ import org.apache.solr.common.util.NamedList;
  *
  *  Expression Syntax:
  *
- *  Default function call uses the "count(*)" value for node freq.
+ *  Default function call uses the "count(*)" field for node freq.
  *
  *  You can use a different value for node freq by providing the nodeFreq param
- *  scoreNodes(gatherNodes(...), nodeFreq="min(weight)")
+ *  scoreNodes(gatherNodes(...), termFreq="min(weight)")
  *
  **/
 
@@ -188,6 +187,9 @@ public class ScoreNodesStream extends TupleStream implements Expressible
     params.add(TermsParams.TERMS_FIELD, field);
     params.add(TermsParams.TERMS_STATS, "true");
     params.add(TermsParams.TERMS_LIST, builder.toString());
+    params.add(TermsParams.TERMS_LIMIT, Integer.toString(nodes.size()));
+    params.add("distrib", "true");
+
     QueryRequest request = new QueryRequest(params);
 
 


Mime
View raw message