public class SumScoreFacetRequest extends FacetRequest
FacetRequest for weighting facets by summing the scores of matching
documents.FacetRequest.FacetArraysSource, FacetRequest.ResultMode, FacetRequest.SortOrdercategoryPath, DEFAULT_DEPTH, DEFAULT_RESULT_MODE, numResults| Constructor and Description |
|---|
SumScoreFacetRequest(CategoryPath path,
int num)
Create a score facet request for a given node in the taxonomy.
|
| Modifier and Type | Method and Description |
|---|---|
Aggregator |
createAggregator(boolean useComplements,
FacetArrays arrays,
TaxonomyReader taxonomy)
Create an aggregator for this facet request.
|
FacetRequest.FacetArraysSource |
getFacetArraysSource()
Returns the
FacetRequest.FacetArraysSource this FacetRequest uses in
FacetRequest.getValueOf(FacetArrays, int). |
double |
getValueOf(FacetArrays arrays,
int ordinal)
Return the value of a category used for facets computations for this
request.
|
equals, getDepth, getNumLabel, getResultMode, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortOrder, toStringpublic SumScoreFacetRequest(CategoryPath path, int num)
public Aggregator createAggregator(boolean useComplements, FacetArrays arrays, TaxonomyReader taxonomy)
FacetRequestcreateAggregator in class FacetRequestuseComplements - whether the complements optimization is being used for current
computation.arrays - provider for facet arrays in use for current computation.taxonomy - reader of taxonomy in effect.public double getValueOf(FacetArrays arrays, int ordinal)
FacetRequestgetValueOf in class FacetRequestarrays - provider for facet arrays in use for current computation.ordinal - an index into the count arrays now in effect in
arrays. E.g., for ordinal number n, with
partition, of size partitionSize, now covering n,
getValueOf would be invoked with idx
being n % partitionSize.public FacetRequest.FacetArraysSource getFacetArraysSource()
FacetRequestFacetRequest.FacetArraysSource this FacetRequest uses in
FacetRequest.getValueOf(FacetArrays, int).getFacetArraysSource in class FacetRequestCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.