Class PivotFacetFieldValueCollection
java.lang.Object
org.apache.solr.handler.component.PivotFacetFieldValueCollection
- All Implemented Interfaces:
Iterable<PivotFacetValue>
Emcapsulates a collection of
PivotFacetValues associated with a PivotFacetField
withs pecial tracking of a PivotFacetValue corrisponding to the null value
when FacetParams.FACET_MISSING is used.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSortsPivotFacetValueinstances by their countstatic classSortsPivotFacetValueinstances by their value -
Constructor Summary
ConstructorsConstructorDescriptionPivotFacetFieldValueCollection(int minCount, int offset, int limit, String fieldSort) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(PivotFacetValue pfValue) Adds aPivotFacetValueto this collection -- callers must not use this method if aPivotFacetValuewith the same value already exists in this collectionget(Comparable value) Fast lookup to retrieve aPivotFacetValuefrom this collection if it existsgetAt(int index) Fetchs aPivotFacetValuefrom this collection via the index, may not be used to fetch thePivotFacetValuecorrisponding to the missing-value.Read-Only access to the Collection ofPivotFacetValues corrisponding to non-missing values.intSize ofgetExplicitValuesList()Returns the appropriate sub-list of the explicit values that need to be refined, based on theFacetParams.FACET_OFFSET&FacetParams.FACET_LIMITfor this field.iterator()Iterator over all elements in this Collection, including the result ofgetMissingValue()as the last element (if it exists)voidIndicates that the values in this collection have been modified by the caller.intsize()Total number ofPivotFacetValues, including the "missing" value if used.voidsort()Sorts the collection and recursively sorts the collections assocaited with any sub-pivots.toString()voidtrim()Destructive method that recursively prunes values from the data structure based on the counts for those values and the effective sort, mincount, limit, and offset being used for each field.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
PivotFacetFieldValueCollection
-
-
Method Details
-
markDirty
public void markDirty()Indicates that the values in this collection have been modified by the caller.Any caller that manipulates the
PivotFacetValues contained in this collection must call this method after doing so. -
getMissingValue
- Returns:
- the appropriate
PivotFacetValueobject, may be null if we "missing" is not in use, or if it does not meat the mincount.
-
getExplicitValuesList
Read-Only access to the Collection ofPivotFacetValues corrisponding to non-missing values.- See Also:
-
getExplicitValuesListSize
public int getExplicitValuesListSize()Size ofgetExplicitValuesList() -
size
public int size()Total number ofPivotFacetValues, including the "missing" value if used.- See Also:
-
getNextLevelValuesToRefine
Returns the appropriate sub-list of the explicit values that need to be refined, based on theFacetParams.FACET_OFFSET&FacetParams.FACET_LIMITfor this field.- See Also:
-
get
Fast lookup to retrieve aPivotFacetValuefrom this collection if it exists- Parameters:
value- of thePivotFacetValueto lookup, ifnullthis returns the same asgetMissingValue()- Returns:
- the corrisponding
PivotFacetValueor null if there is noPivotFacetValuein this collection corrisponding to the specified value.
-
getAt
Fetchs aPivotFacetValuefrom this collection via the index, may not be used to fetch thePivotFacetValuecorrisponding to the missing-value.- See Also:
-
add
Adds aPivotFacetValueto this collection -- callers must not use this method if aPivotFacetValuewith the same value already exists in this collection -
trim
public void trim()Destructive method that recursively prunes values from the data structure based on the counts for those values and the effective sort, mincount, limit, and offset being used for each field.This method should only be called after all refinement is completed.
- See Also:
-
sort
public void sort()Sorts the collection and recursively sorts the collections assocaited with any sub-pivots.- See Also:
-
iterator
Iterator over all elements in this Collection, including the result ofgetMissingValue()as the last element (if it exists)- Specified by:
iteratorin interfaceIterable<PivotFacetValue>
-
toString
-