org.apache.lucene.facet.associations
Class AssociationIntSumFacetRequest
java.lang.Object
org.apache.lucene.facet.search.FacetRequest
org.apache.lucene.facet.associations.AssociationIntSumFacetRequest
public class AssociationIntSumFacetRequest
- extends FacetRequest
A FacetRequest
for weighting facets according to their integer
association by summing the association values.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Methods inherited from class org.apache.lucene.facet.search.FacetRequest |
createAggregator, equals, getDepth, getNumLabel, getResultMode, getSortOrder, hashCode, setDepth, setNumLabel, setResultMode, setSortOrder, toString |
AssociationIntSumFacetRequest
public AssociationIntSumFacetRequest(CategoryPath path,
int num)
- Create an integer association facet request for a given node in the
taxonomy.
getFacetArraysSource
public FacetRequest.FacetArraysSource getFacetArraysSource()
- Description copied from class:
FacetRequest
- Returns the
FacetRequest.FacetArraysSource
this FacetRequest
uses in
FacetRequest.getValueOf(FacetArrays, int)
.
- Specified by:
getFacetArraysSource
in class FacetRequest
getValueOf
public double getValueOf(FacetArrays arrays,
int ordinal)
- Description copied from class:
FacetRequest
- Return the value of a category used for facets computations for this
request. For a count request this would be the count for that facet, i.e.
an integer number. but for other requests this can be the result of a more
complex operation, and the result can be any double precision number.
Having this method with a general name value which is double
precision allows to have more compact API and code for handling counts and
perhaps other requests (such as for associations) very similarly, and by
the same code and API, avoiding code duplication.
- Specified by:
getValueOf
in class FacetRequest
- Parameters:
arrays
- 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.
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.