Package org.apache.lucene.facet
Class FacetField
- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.facet.FacetField
-
- All Implemented Interfaces:
IndexableField
public class FacetField extends Field
Add an instance of this to yourDocumentfor every facet label.NOTE: you must call
FacetsConfig.build(Document)before you add the document to IndexWriter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.document.Field
Field.Store
-
-
Field Summary
Fields Modifier and Type Field Description StringdimDimension for this field.String[]pathPath for this field.static FieldTypeTYPEField type used for storing facet values: docs, freqs, and positions.-
Fields inherited from class org.apache.lucene.document.Field
fieldsData, name, tokenStream, type
-
-
Constructor Summary
Constructors Constructor Description FacetField(String dim, String... path)Creates the this fromdimandpath.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringtoString()static voidverifyLabel(String label)Verifies the label is not null or empty string.-
Methods inherited from class org.apache.lucene.document.Field
binaryValue, fieldType, getCharSequenceValue, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStream, tokenStreamValue
-
-