public abstract class AnalyticsField extends Object implements AnalyticsValueStream
AnalyticsValueStream.AbstractAnalyticsValueStream, AnalyticsValueStream.ExpressionType
Modifier and Type | Field and Description |
---|---|
protected String |
fieldName |
protected static int |
initialArrayLength |
Modifier | Constructor and Description |
---|---|
protected |
AnalyticsField(String fieldName) |
Modifier and Type | Method and Description |
---|---|
abstract void |
collect(int doc)
Collect the value(s) of the wrapped field for the given document, and store the value.
|
AnalyticsValueStream |
convertToConstant()
Converts this value to a
ConstantValue if it's expression type is AnalyticsValueStream.ExpressionType.CONST . |
abstract void |
doSetNextReader(LeafReaderContext context)
Set the segment reader context
|
String |
getExpressionStr()
Get the expression string of the analytics value stream.
|
AnalyticsValueStream.ExpressionType |
getExpressionType()
Get the type of the expression that this class represents.
|
String |
getName()
Get the name of function or value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createExpressionString, determineMappingPhase, streamObjects
protected static final int initialArrayLength
protected final String fieldName
protected AnalyticsField(String fieldName)
public String getExpressionStr()
AnalyticsValueStream
ExpressionFactory.createExpression(String)
, the exact same expression should be created.getExpressionStr
in interface AnalyticsValueStream
public String getName()
AnalyticsValueStream
getName
in interface AnalyticsValueStream
public AnalyticsValueStream.ExpressionType getExpressionType()
AnalyticsValueStream
getExpressionType
in interface AnalyticsValueStream
public AnalyticsValueStream convertToConstant()
AnalyticsValueStream
ConstantValue
if it's expression type is AnalyticsValueStream.ExpressionType.CONST
.
If the value is reduced then no conversion will occur and the value itself will be returned.convertToConstant
in interface AnalyticsValueStream
public abstract void doSetNextReader(LeafReaderContext context) throws IOException
context
- segment contextIOException
- if an error occurs while loading the leaf readerpublic abstract void collect(int doc) throws IOException
doc
- ID of the document to collectIOException
- if an error occurs while reading the document.Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.