org.apache.lucene.facet.index.params
Class CategoryListParams

java.lang.Object
  extended by org.apache.lucene.facet.index.params.CategoryListParams
All Implemented Interfaces:
Serializable

public class CategoryListParams
extends Object
implements Serializable

Contains parameters for a category list *

See Also:
Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
static Term DEFAULT_TERM
          The default term used to store the facets information.
 
Constructor Summary
CategoryListParams()
          Constructs a default category list parameters object, using DEFAULT_TERM.
CategoryListParams(Term term)
          Constructs a category list parameters object, using the given Term.
 
Method Summary
 CategoryListIterator createCategoryListIterator(int partition)
          Create the CategoryListIterator for the specified partition.
 IntEncoder createEncoder()
          Allows to override how categories are encoded and decoded.
 boolean equals(Object o)
           
 Term getTerm()
          A Term who's payload holds the category-list.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TERM

public static final Term DEFAULT_TERM
The default term used to store the facets information.

Constructor Detail

CategoryListParams

public CategoryListParams()
Constructs a default category list parameters object, using DEFAULT_TERM.


CategoryListParams

public CategoryListParams(Term term)
Constructs a category list parameters object, using the given Term.

Parameters:
term - who's payload hold the category-list.
Method Detail

getTerm

public final Term getTerm()
A Term who's payload holds the category-list.


createEncoder

public IntEncoder createEncoder()
Allows to override how categories are encoded and decoded. A matching IntDecoder is provided by the IntEncoder.

Default implementation creates a new Sorting(Unique(DGap)) encoder. Uniqueness in this regard means when the same category appears twice in a document, only one appearance would be encoded. This has effect on facet counting results.

Some possible considerations when overriding may be:

In any event when changing this value make sure you know what you are doing, and test the results - e.g. counts, if the application is about counting facets.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

createCategoryListIterator

public CategoryListIterator createCategoryListIterator(int partition)
                                                throws IOException
Create the CategoryListIterator for the specified partition.

Throws:
IOException


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.