|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.facet.params.FacetIndexingParams
public class FacetIndexingParams
Defines parameters that are needed for facets indexing. Note that this class does not have any setters. That's because overriding the default parameters is considered expert. If you wish to override them, simply extend this class and override the relevant getter.
NOTE: This class is also used during faceted search in order to e.g. know which field holds the drill-down terms or the fulltree posting. Therefore this class should be initialized once and you should refrain from changing it. Also note that if you make any changes to it (e.g. suddenly deciding that drill-down terms should be read from a different field) and use it on an existing index, things may not work as expected.
| Field Summary | |
|---|---|
protected CategoryListParams |
clParams
|
static FacetIndexingParams |
DEFAULT
A FacetIndexingParams which fixes a single
CategoryListParams with
CategoryListParams.DEFAULT_ORDINAL_POLICY. |
protected static CategoryListParams |
DEFAULT_CATEGORY_LIST_PARAMS
|
static char |
DEFAULT_FACET_DELIM_CHAR
The default delimiter with which CategoryPath.components are
concatenated when written to the index, e.g. |
| Constructor Summary | |
|---|---|
FacetIndexingParams()
Initializes new default params. |
|
FacetIndexingParams(CategoryListParams categoryListParams)
Initializes new params with the given CategoryListParams. |
|
| Method Summary | |
|---|---|
int |
drillDownTermText(CategoryPath path,
char[] buffer)
Copies the text required to execute a drill-down query on the given category to the given char[], and returns the number of characters
that were written. |
boolean |
equals(Object obj)
|
List<CategoryListParams> |
getAllCategoryListParams()
Returns a list of all categoryListParams that
are used for facets indexing. |
CategoryListParams |
getCategoryListParams(CategoryPath category)
Returns the CategoryListParams for this CategoryPath. |
char |
getFacetDelimChar()
Returns the delimiter character used internally for concatenating category path components, e.g. |
int |
getPartitionSize()
Returns the size of a partition. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final CategoryListParams DEFAULT_CATEGORY_LIST_PARAMS
public static final FacetIndexingParams DEFAULT
FacetIndexingParams which fixes a single
CategoryListParams with
CategoryListParams.DEFAULT_ORDINAL_POLICY.
public static final char DEFAULT_FACET_DELIM_CHAR
CategoryPath.components are
concatenated when written to the index, e.g. as drill-down terms. If you
choose to override it by overiding getFacetDelimChar(), you should
make sure that you return a character that's not found in any path
component.
protected final CategoryListParams clParams
| Constructor Detail |
|---|
public FacetIndexingParams()
DEFAULT to save unnecessary object allocations.
public FacetIndexingParams(CategoryListParams categoryListParams)
CategoryListParams.
| Method Detail |
|---|
public CategoryListParams getCategoryListParams(CategoryPath category)
CategoryListParams for this CategoryPath. The
default implementation returns the same CategoryListParams for all
categories (even if category is null).
PerDimensionIndexingParams
public int drillDownTermText(CategoryPath path,
char[] buffer)
char[], and returns the number of characters
that were written.
NOTE: You should make sure that the char[] is large enough,
by e.g. calling CategoryPath.fullPathLength().
public int getPartitionSize()
partitionSize=100K
would mean that if your taxonomy index contains 420K categories, they will
be divided into 5 groups and at search time a FacetArrays will be
allocated at the size of the partition.
This is real advanced setting and should be changed with care. By default, all categories are put in one partition. You should modify this setting if you have really large taxonomies (e.g. 1M+ nodes).
public List<CategoryListParams> getAllCategoryListParams()
categoryListParams that
are used for facets indexing.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic char getFacetDelimChar()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||