SOLR-7103: Remove unused method params in faceting code

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1659175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2015-02-12 09:24:37 +00:00
parent a94083c06b
commit 9ace7e1694
4 changed files with 13 additions and 13 deletions

View File

@ -147,6 +147,8 @@ Other Changes
* SOLR-7076: In DIH, TikaEntityProcessor should have support for onError=skip
(Noble Paul)
* 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.

View File

@ -237,7 +237,7 @@ public class FacetComponent extends SearchComponent {
shardsRefineRequest.params.remove(FacetParams.FACET_PIVOT_MINCOUNT);
}
enqueuePivotFacetShardRequests(null, rb, shardNum);
enqueuePivotFacetShardRequests(rb, shardNum);
}
}
}
@ -245,9 +245,7 @@ public class FacetComponent extends SearchComponent {
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 SearchComponent {
modifyRequestForFieldFacets(rb, sreq, fi);
modifyRequestForRangeFacets(sreq, fi);
modifyRequestForRangeFacets(sreq);
modifyRequestForPivotFacets(rb, sreq, fi.pivotFacets);
@ -332,7 +330,7 @@ public class FacetComponent extends SearchComponent {
}
// 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 SearchComponent {
// 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 SearchComponent {
// 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 SearchComponent {
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 SearchComponent {
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 SearchComponent {
// 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

View File

@ -119,7 +119,7 @@ public class PivotFacet extends FacetBase {
* @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();

View File

@ -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);