You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/02/12 10:25:23 UTC
svn commit: r1659176 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/core/ solr/core/src/java/org/apache/solr/handler/component/
Author: shalin
Date: Thu Feb 12 09:25:23 2015
New Revision: 1659176
URL: http://svn.apache.org/r1659176
Log:
SOLR-7103: Remove unused method params in faceting code
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_5x/solr/core/ (props changed)
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetField.java
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1659176&r1=1659175&r2=1659176&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Thu Feb 12 09:25:23 2015
@@ -99,6 +99,8 @@ Other Changes
* SOLR-7094: Better error reporting of JSON parse issues when indexing docs
(Ishan Chattopadhyaya via Timothy Potter)
+* SOLR-7103: Remove unused method params in faceting code. (shalin)
+
================== 5.0.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java?rev=1659176&r1=1659175&r2=1659176&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java Thu Feb 12 09:25:23 2015
@@ -237,7 +237,7 @@ public class FacetComponent extends Sear
shardsRefineRequest.params.remove(FacetParams.FACET_PIVOT_MINCOUNT);
}
- enqueuePivotFacetShardRequests(null, rb, shardNum);
+ enqueuePivotFacetShardRequests(rb, shardNum);
}
}
}
@@ -245,9 +245,7 @@ public class FacetComponent extends Sear
return ResponseBuilder.STAGE_DONE;
}
- private void enqueuePivotFacetShardRequests
- (HashMap<String,List<String>> pivotFacetRefinements,
- ResponseBuilder rb, int shardNum) {
+ private void enqueuePivotFacetShardRequests(ResponseBuilder rb, int shardNum) {
FacetInfo fi = rb._facetInfo;
@@ -315,7 +313,7 @@ public class FacetComponent extends Sear
modifyRequestForFieldFacets(rb, sreq, fi);
- modifyRequestForRangeFacets(sreq, fi);
+ modifyRequestForRangeFacets(sreq);
modifyRequestForPivotFacets(rb, sreq, fi.pivotFacets);
@@ -332,7 +330,7 @@ public class FacetComponent extends Sear
}
// we must get all the range buckets back in order to have coherent lists at the end, see SOLR-6154
- private void modifyRequestForRangeFacets(ShardRequest sreq, FacetInfo fi) {
+ private void modifyRequestForRangeFacets(ShardRequest sreq) {
// Collect all the range fields.
final String[] fields = sreq.params.getParams(FacetParams.FACET_RANGE);
if (fields != null) {
@@ -596,7 +594,7 @@ public class FacetComponent extends Sear
// fbs can be null if a shard request failed
if (fbs != null && (sfc.termNum >= fbs.length() || !fbs.get(sfc.termNum))) {
// if missing from this shard, add the max it could be
- maxCount += dff.maxPossible(sfc, shardNum);
+ maxCount += dff.maxPossible(shardNum);
}
}
if (maxCount >= smallestCount) {
@@ -612,7 +610,7 @@ public class FacetComponent extends Sear
// fbs can be null if a shard request failed
if (fbs != null &&
(sfc.termNum >= fbs.length() || !fbs.get(sfc.termNum)) &&
- dff.maxPossible(sfc, shardNum) > 0) {
+ dff.maxPossible(shardNum) > 0) {
dff.needRefinements = true;
List<String> lst = dff._toRefine[shardNum];
@@ -965,7 +963,7 @@ public class FacetComponent extends Sear
private void reQueuePivotFacetShardRequests(ResponseBuilder rb) {
for (int shardNum = 0; shardNum < rb.shards.length; shardNum++) {
if (doAnyPivotFacetRefinementRequestsExistForShard(rb._facetInfo, shardNum)) {
- enqueuePivotFacetShardRequests(null, rb, shardNum);
+ enqueuePivotFacetShardRequests(rb, shardNum);
}
}
}
@@ -1063,7 +1061,7 @@ public class FacetComponent extends Sear
for (Entry<String,PivotFacet> entry : rb._facetInfo.pivotFacets) {
String key = entry.getKey();
PivotFacet pivot = entry.getValue();
- List<NamedList<Object>> trimmedPivots = pivot.getTrimmedPivotsAsListOfNamedLists(rb);
+ List<NamedList<Object>> trimmedPivots = pivot.getTrimmedPivotsAsListOfNamedLists();
if (null == trimmedPivots) {
trimmedPivots = Collections.<NamedList<Object>>emptyList();
}
@@ -1360,7 +1358,7 @@ public class FacetComponent extends Sear
// returns the max possible value this ShardFacetCount could have for this shard
// (assumes the shard did not report a count for this value)
- long maxPossible(ShardFacetCount sfc, int shardNum) {
+ long maxPossible(int shardNum) {
return missingMax[shardNum];
// TODO: could store the last term in the shard to tell if this term
// comes before or after it. If it comes before, we could subtract 1
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java?rev=1659176&r1=1659175&r2=1659176&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacet.java Thu Feb 12 09:25:23 2015
@@ -119,7 +119,7 @@ public class PivotFacet extends FacetBas
* @see PivotFacetField#trim
* @see PivotFacetField#convertToListOfNamedLists
*/
- public List<NamedList<Object>> getTrimmedPivotsAsListOfNamedLists(ResponseBuilder rb) {
+ public List<NamedList<Object>> getTrimmedPivotsAsListOfNamedLists() {
if (null == pivotFacetField) {
// no values in any shard for the top field of this pivot
return Collections.<NamedList<Object>>emptyList();
Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetField.java?rev=1659176&r1=1659175&r2=1659176&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetField.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/handler/component/PivotFacetField.java Thu Feb 12 09:25:23 2015
@@ -259,7 +259,7 @@ public class PivotFacetField {
// (mincount may have excluded from a shard)
FacetParams.FACET_SORT_INDEX.equals(facetFieldSort)
// if we are doing count order, we need to refine if the limit was hit
- // (if it not, the shard doesn't have the value or it would have returned already)
+ // (if not, the shard doesn't have the value or it would have returned already)
|| numberOfValuesContributedByShardWasLimitedByFacetFieldLimit(shard) ) {
pf.addRefinement(shard, value);