Class DefaultFacetIndexingParams
- java.lang.Object
-
- org.apache.lucene.facet.index.params.DefaultFacetIndexingParams
-
- All Implemented Interfaces:
Serializable
,FacetIndexingParams
- Direct Known Subclasses:
PerDimensionIndexingParams
public class DefaultFacetIndexingParams extends Object implements FacetIndexingParams
Default implementation forFacetIndexingParams
.Getters for partition-size,
OrdinalPolicy
andPathPolicy
are all final, and so the proper way to modify them when extending this class is throughfixedPartitionSize()
,fixedOrdinalPolicy()
orfixedPathPolicy()
accordingly.- See Also:
- Serialized Form
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Field Summary
Fields Modifier and Type Field Description static char
DEFAULT_FACET_DELIM_CHAR
delimiter between a categories in a path, e.g.
-
Constructor Summary
Constructors Constructor Description DefaultFacetIndexingParams()
DefaultFacetIndexingParams(CategoryListParams categoryListParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
drillDownTermText(CategoryPath path, char[] buffer)
Return the drilldown Term-Text which does not need to do any allocations.boolean
equals(Object obj)
protected OrdinalPolicy
fixedOrdinalPolicy()
"fixed" ordinal policy.protected int
fixedPartitionSize()
"fixed" partition size.protected PathPolicy
fixedPathPolicy()
"fixed" path policy.Iterable<CategoryListParams>
getAllCategoryListParams()
Return info about all category lists in the index.CategoryListParams
getCategoryListParams(CategoryPath category)
The name of the category-list to put this category in, or null if this category should not be aggregatable.char
getFacetDelimChar()
UseDEFAULT_FACET_DELIM_CHAR
as the delimiter.OrdinalPolicy
getOrdinalPolicy()
Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinalsint
getPartitionSize()
Get the partition size.PathPolicy
getPathPolicy()
Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.int
hashCode()
-
-
-
Field Detail
-
DEFAULT_FACET_DELIM_CHAR
public static final char DEFAULT_FACET_DELIM_CHAR
delimiter between a categories in a path, e.g. Products FACET_DELIM Consumer FACET_DELIM Tv. This should be a character not found in any path component- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultFacetIndexingParams
public DefaultFacetIndexingParams()
-
DefaultFacetIndexingParams
public DefaultFacetIndexingParams(CategoryListParams categoryListParams)
-
-
Method Detail
-
getCategoryListParams
public CategoryListParams getCategoryListParams(CategoryPath category)
Description copied from interface:FacetIndexingParams
The name of the category-list to put this category in, or null if this category should not be aggregatable.By default, all categories are written to the same category list, but applications which know in advance that in some situations only parts of the category hierarchy needs to be counted can divide the categories into two or more different category lists.
If null is returned for a category, it means that this category should not appear in any category list, and thus counts for it cannot be aggregated. This category can still be used for drill-down, even though the count for it is not known.
- Specified by:
getCategoryListParams
in interfaceFacetIndexingParams
-
drillDownTermText
public int drillDownTermText(CategoryPath path, char[] buffer)
Description copied from interface:FacetIndexingParams
Return the drilldown Term-Text which does not need to do any allocations. The number of chars set is returned.Note: Make sure
buffer
is large enough.- Specified by:
drillDownTermText
in interfaceFacetIndexingParams
- See Also:
CategoryPath.charsNeededForFullPath()
-
fixedPartitionSize
protected int fixedPartitionSize()
"fixed" partition size.- See Also:
getPartitionSize()
-
fixedOrdinalPolicy
protected OrdinalPolicy fixedOrdinalPolicy()
"fixed" ordinal policy.- See Also:
getOrdinalPolicy()
-
fixedPathPolicy
protected PathPolicy fixedPathPolicy()
"fixed" path policy.- See Also:
getPathPolicy()
-
getPartitionSize
public final int getPartitionSize()
Description copied from interface:FacetIndexingParams
Get the partition size. Same value should be used during the life time of an index. At search time this value is compared with actual taxonomy size and their minimum is used.- Specified by:
getPartitionSize
in interfaceFacetIndexingParams
-
getAllCategoryListParams
public Iterable<CategoryListParams> getAllCategoryListParams()
Description copied from interface:FacetIndexingParams
Return info about all category lists in the index.- Specified by:
getAllCategoryListParams
in interfaceFacetIndexingParams
- See Also:
FacetIndexingParams.getCategoryListParams(CategoryPath)
-
getOrdinalPolicy
public final OrdinalPolicy getOrdinalPolicy()
Description copied from interface:FacetIndexingParams
Get the policy for indexing category ordinals, used for deciding how "high" to climb in taxonomy from a category when ingesting its ordinals- Specified by:
getOrdinalPolicy
in interfaceFacetIndexingParams
-
getPathPolicy
public final PathPolicy getPathPolicy()
Description copied from interface:FacetIndexingParams
Get the policy for indexing category paths, used for deciding how "high" to climb in taxonomy from a category when ingesting its category paths.- Specified by:
getPathPolicy
in interfaceFacetIndexingParams
-
getFacetDelimChar
public char getFacetDelimChar()
UseDEFAULT_FACET_DELIM_CHAR
as the delimiter.- Specified by:
getFacetDelimChar
in interfaceFacetIndexingParams
-
-