Package | Description |
---|---|
org.apache.lucene.facet.index |
Indexing of document categories
Attachment of
CategoryPath 's
or CategoryAttribute 's
to a given document using a
Taxonomy . |
org.apache.lucene.facet.index.attributes |
Category attributes and their properties for indexing
Attributes for a
category ,
possibly containing
category property 's. |
org.apache.lucene.facet.index.categorypolicy |
Policies for indexing categories
There are two kinds of policies:
Path policies are based on the path of the category.
|
org.apache.lucene.facet.index.params |
Indexing-time specifications for handling facets
Parameters on how facets are to be written to the index,
such as which fields and terms are used to refer to the facets posting list.
|
org.apache.lucene.facet.index.streaming |
Expert: attributes streaming definition for indexing facets
Steaming of facets attributes is a low level indexing interface with Lucene indexing.
|
org.apache.lucene.facet.search |
Faceted Search API
API for faceted search has several interfaces - simple, top level ones, adequate for most users,
and advanced, more complicated ones, for the more advanced users.
|
org.apache.lucene.facet.search.params |
Parameters for Faceted Search
|
org.apache.lucene.facet.search.params.association |
Association-based Parameters for Faceted Search.
|
org.apache.lucene.facet.search.results |
Results of Faceted Search
|
org.apache.lucene.facet.taxonomy |
Taxonomy of Categories
Facets are defined using a hierarchy of categories, known as a
Taxonomy
For example, in a book store application, a Taxonomy could have the following hierarchy: Author Mark Twain J. |
org.apache.lucene.facet.taxonomy.directory |
Taxonomy implemented using a Lucene-Index
|
org.apache.lucene.facet.taxonomy.writercache |
Improves indexing time by caching a map of CategoryPath to their Ordinal
|
org.apache.lucene.facet.taxonomy.writercache.cl2o |
Category->Ordinal caching implementation using an optimized data-structures
The internal map data structure consumes less memory (~30%) and is faster (~50%) compared to a
Java HashMap<String, Integer>.
|
org.apache.lucene.facet.taxonomy.writercache.lru |
An LRU cache implementation for the CategoryPath to Ordinal map
|
Modifier and Type | Field and Description |
---|---|
protected Map<CategoryPath,CategoryAttribute> |
CategoryContainer.map |
Modifier and Type | Method and Description |
---|---|
CategoryAttribute |
CategoryContainer.addCategory(CategoryPath categoryPath)
Add a category.
|
CategoryAttribute |
CategoryContainer.addCategory(CategoryPath categoryPath,
CategoryProperty... properties)
Add a category with multiple properties.
|
CategoryAttribute |
CategoryContainer.addCategory(CategoryPath categoryPath,
CategoryProperty property)
Add a category with a property.
|
CategoryAttribute |
CategoryContainer.getCategoryAttribute(CategoryPath categoryPath)
Get the
CategoryAttribute this container has for a certain
category, or null if the category is not in the container. |
Modifier and Type | Method and Description |
---|---|
CategoryDocumentBuilder |
CategoryDocumentBuilder.setCategoryPaths(Iterable<CategoryPath> categoryPaths)
Set the categories of the document builder from an
Iterable of
CategoryPath objects. |
Modifier and Type | Field and Description |
---|---|
protected CategoryPath |
CategoryAttributeImpl.categoryPath
The category path instance.
|
Modifier and Type | Method and Description |
---|---|
CategoryPath |
CategoryAttributeImpl.getCategoryPath()
Returns the category path value.
|
CategoryPath |
CategoryAttribute.getCategoryPath()
Returns the value of this attribute: a category path.
|
Modifier and Type | Method and Description |
---|---|
void |
CategoryAttributeImpl.setCategoryPath(CategoryPath cp) |
void |
CategoryAttribute.setCategoryPath(CategoryPath cp)
Sets the category path value of this attribute.
|
Constructor and Description |
---|
CategoryAttributeImpl(CategoryPath categoryPath)
Construct a CategoryAttributeImpl with the given CategoryPath.
|
Constructor and Description |
---|
CategoryAttributesIterable(Iterable<CategoryPath> inputIterable) |
Modifier and Type | Method and Description |
---|---|
boolean |
PathPolicy.shouldAdd(CategoryPath categoryPath)
Check whether a given category path should be added to the stream.
|
boolean |
NonTopLevelPathPolicy.shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than
TaxonomyReader.ROOT_ORDINAL . true otherwise. |
boolean |
DefaultPathPolicy.shouldAdd(CategoryPath categoryPath)
Filters out (returns false) CategoryPaths equal or less than
TaxonomyReader.ROOT_ORDINAL . true otherwise. |
Modifier and Type | Method and Description |
---|---|
void |
PerDimensionIndexingParams.addCategoryListParams(CategoryPath category,
CategoryListParams clParams)
Add a CategoryListParams for a given CategoryPath's dimension or
"zero-th" category.
|
int |
FacetIndexingParams.drillDownTermText(CategoryPath path,
char[] buffer)
Return the drilldown Term-Text which does not need to do any allocations.
|
int |
DefaultFacetIndexingParams.drillDownTermText(CategoryPath path,
char[] buffer) |
CategoryListParams |
PerDimensionIndexingParams.getCategoryListParams(CategoryPath category)
Get the CategoryListParams based on the dimension or "zero-th category"
of the specified CategoryPath.
|
CategoryListParams |
FacetIndexingParams.getCategoryListParams(CategoryPath category)
The name of the category-list to put this category in, or null if this
category should not be aggregatable.
|
CategoryListParams |
DefaultFacetIndexingParams.getCategoryListParams(CategoryPath category) |
Modifier and Type | Method and Description |
---|---|
protected CategoryListPayloadStream |
CountingListTokenizer.getPayloadStream(CategoryPath categoryPath,
int ordinal) |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.Query |
DrillDown.query(FacetIndexingParams iParams,
CategoryPath... paths)
Return a query for drilling down into all given categories (AND).
|
static org.apache.lucene.search.Query |
DrillDown.query(FacetIndexingParams iParams,
org.apache.lucene.search.Query baseQuery,
CategoryPath... paths)
Turn a base query into a drilling-down query for all given category paths (AND).
|
static org.apache.lucene.search.Query |
DrillDown.query(FacetSearchParams sParams,
CategoryPath... paths)
Return a query for drilling down into all given categories (AND).
|
static org.apache.lucene.search.Query |
DrillDown.query(FacetSearchParams sParams,
org.apache.lucene.search.Query baseQuery,
CategoryPath... paths)
Turn a base query into a drilling-down query for all given category paths (AND).
|
static org.apache.lucene.search.Query |
DrillDown.query(org.apache.lucene.search.Query baseQuery,
CategoryPath... paths)
Turn a base query into a drilling-down query using the default
FacetSearchParams |
static org.apache.lucene.index.Term |
DrillDown.term(FacetIndexingParams iParams,
CategoryPath path)
Return a term for drilling down into a category.
|
static org.apache.lucene.index.Term |
DrillDown.term(FacetSearchParams sParams,
CategoryPath path) |
Modifier and Type | Method and Description |
---|---|
CategoryPath |
FacetRequest.getCategoryPath()
The root category of this facet request.
|
Constructor and Description |
---|
CountFacetRequest(CategoryPath path,
int num)
Create a count facet request for a given node in the taxonomy.
|
FacetRequest(CategoryPath path,
int numResults)
Initialize the request with a given path, and a requested number of facets
results.
|
ScoreFacetRequest(CategoryPath path,
int num)
Create a score facet request for a given node in the taxonomy.
|
Constructor and Description |
---|
AssociationFloatSumFacetRequest(CategoryPath path,
int num)
Create a float association facet request for a given node in the
taxonomy.
|
AssociationIntSumFacetRequest(CategoryPath path,
int num)
Create an integer association facet request for a given node in the
taxonomy.
|
Modifier and Type | Method and Description |
---|---|
CategoryPath |
MutableFacetResultNode.getLabel() |
CategoryPath |
FacetResultNode.getLabel()
Category path of the category of this result, or null if not computed,
because the application did not request to compute it.
|
CategoryPath |
MutableFacetResultNode.getLabel(TaxonomyReader taxonomyReader) |
CategoryPath |
FacetResultNode.getLabel(TaxonomyReader taxonomyReader)
Category path of the category of this result.
|
Modifier and Type | Method and Description |
---|---|
void |
MutableFacetResultNode.setLabel(CategoryPath label)
Set the label of the category of this result.
|
Constructor and Description |
---|
MutableFacetResultNode(int ordinal,
double value,
double residue,
CategoryPath label,
List<FacetResultNode> subResults)
Create a Facet Result Node.
|
Modifier and Type | Method and Description |
---|---|
CategoryPath |
TaxonomyReader.getPath(int ordinal)
getPath() returns the path name of the category with the given
ordinal.
|
Modifier and Type | Method and Description |
---|---|
int |
TaxonomyWriter.addCategory(CategoryPath categoryPath)
addCategory() adds a category with a given path name to the taxonomy,
and returns its ordinal.
|
int |
CategoryPath.compareTo(CategoryPath other)
Compares this CategoryPath with the other CategoryPath for lexicographic
order.
|
int |
TaxonomyReader.getOrdinal(CategoryPath categoryPath)
getOrdinal() returns the ordinal of the category given as a path.
|
boolean |
TaxonomyReader.getPath(int ordinal,
CategoryPath result)
getPath() returns the path name of the category with the given
ordinal.
|
boolean |
CategoryPath.isDescendantOf(CategoryPath other)
Test whether this object is a descendant of another CategoryPath.
|
Constructor and Description |
---|
CategoryPath(CategoryPath existing)
Construct a new CategoryPath object, copying the path given in an
existing CategoryPath object.
|
CategoryPath(CategoryPath existing,
int prefixLen)
Construct a new CategoryPath object, copying a prefix with the given
number of components of the path given in an existing CategoryPath
object.
|
Modifier and Type | Method and Description |
---|---|
CategoryPath |
DirectoryTaxonomyReader.getPath(int ordinal) |
Modifier and Type | Method and Description |
---|---|
int |
DirectoryTaxonomyWriter.addCategory(CategoryPath categoryPath) |
protected int |
DirectoryTaxonomyWriter.addCategoryDocument(CategoryPath categoryPath,
int length,
int parent) |
protected int |
DirectoryTaxonomyWriter.findCategory(CategoryPath categoryPath)
Look up the given category in the cache and/or the on-disk storage,
returning the category's ordinal, or a negative number in case the
category does not yet exist in the taxonomy.
|
int |
DirectoryTaxonomyReader.getOrdinal(CategoryPath categoryPath) |
boolean |
DirectoryTaxonomyReader.getPath(int ordinal,
CategoryPath result) |
Modifier and Type | Method and Description |
---|---|
int |
TaxonomyWriterCache.get(CategoryPath categoryPath)
Lookup a category in the cache, returning its ordinal, or a negative
number if the category is not in the cache.
|
int |
TaxonomyWriterCache.get(CategoryPath categoryPath,
int length)
Like
TaxonomyWriterCache.get(CategoryPath) , but for a given prefix of the
category path. |
boolean |
TaxonomyWriterCache.put(CategoryPath categoryPath,
int ordinal)
Add a category to the cache, with the given ordinal as the value.
|
boolean |
TaxonomyWriterCache.put(CategoryPath categoryPath,
int prefixLen,
int ordinal)
Like
TaxonomyWriterCache.put(CategoryPath, int) , but for a given prefix of the
category path. |
Modifier and Type | Method and Description |
---|---|
abstract void |
LabelToOrdinal.addLabel(CategoryPath label,
int ordinal)
Adds a new label if its not yet in the table.
|
void |
CompactLabelToOrdinal.addLabel(CategoryPath label,
int ordinal) |
abstract void |
LabelToOrdinal.addLabel(CategoryPath label,
int prefixLen,
int ordinal)
Adds a new label if its not yet in the table.
|
void |
CompactLabelToOrdinal.addLabel(CategoryPath label,
int prefixLen,
int ordinal) |
int |
CollisionMap.addLabel(CategoryPath label,
int hash,
int cid) |
int |
CollisionMap.addLabel(CategoryPath label,
int prefixLen,
int hash,
int cid) |
int |
Cl2oTaxonomyWriterCache.get(CategoryPath categoryPath) |
int |
CollisionMap.get(CategoryPath label,
int hash) |
int |
Cl2oTaxonomyWriterCache.get(CategoryPath categoryPath,
int length) |
int |
CollisionMap.get(CategoryPath label,
int prefixLen,
int hash) |
abstract int |
LabelToOrdinal.getOrdinal(CategoryPath label) |
int |
CompactLabelToOrdinal.getOrdinal(CategoryPath label) |
abstract int |
LabelToOrdinal.getOrdinal(CategoryPath label,
int prefixLen) |
int |
CompactLabelToOrdinal.getOrdinal(CategoryPath label,
int prefixLen) |
boolean |
Cl2oTaxonomyWriterCache.put(CategoryPath categoryPath,
int ordinal) |
boolean |
Cl2oTaxonomyWriterCache.put(CategoryPath categoryPath,
int prefixLen,
int ordinal) |
Modifier and Type | Method and Description |
---|---|
int |
LruTaxonomyWriterCache.get(CategoryPath categoryPath) |
int |
LruTaxonomyWriterCache.get(CategoryPath categoryPath,
int length) |
boolean |
LruTaxonomyWriterCache.put(CategoryPath categoryPath,
int ordinal) |
boolean |
LruTaxonomyWriterCache.put(CategoryPath categoryPath,
int prefixLen,
int ordinal) |