Class TokenStreamColumn
java.lang.Object
org.apache.lucene.document.column.Column
org.apache.lucene.document.column.TokenStreamColumn
A
Column that provides caller-supplied TokenStreams for term inversion. This is
the columnar analogue of setting a custom TokenStream on a Field: the per-doc tokens are fed straight to the inverter without
going through an Analyzer.
Token-stream columns are inverted-index-only: the field type must declare
indexOptions() != NONE and tokenized() == true, and must not also set doc values,
points, be stored, or declare vectors. To both store a value and invert a custom token stream
under one field name, add a separate stored BinaryColumn (or LongColumn) with the
same name in the same batch — each column carries a distinct indexing aspect.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.document.column.Column
Column.Density -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTokenStreamColumn(String name, IndexableFieldType fieldType, Column.Density density) Creates a TokenStreamColumn with the given field name, type, and density. -
Method Summary
Modifier and TypeMethodDescriptionabstract ObjectTupleCursor<TokenStream> tuples()Returns a fresh tuple cursor starting at the beginning of the batch.
-
Constructor Details
-
TokenStreamColumn
Creates a TokenStreamColumn with the given field name, type, and density.- Throws:
IllegalArgumentException- iffieldTypeis not indexed or not tokenized
-
-
Method Details
-
tuples
Returns a fresh tuple cursor starting at the beginning of the batch.
-