public class FacetIndexingParams extends Object
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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
FacetIndexingParams()
Initializes new default params.
|
FacetIndexingParams(CategoryListParams categoryListParams)
Initializes new params with the given
CategoryListParams . |
Modifier and Type | Method and Description |
---|---|
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() |
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
public FacetIndexingParams()
DEFAULT
to save unnecessary object allocations.public FacetIndexingParams(CategoryListParams categoryListParams)
CategoryListParams
.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 char getFacetDelimChar()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.