public enum NumericFieldBridge extends Enum<NumericFieldBridge> implements FieldBridge, TwoWayFieldBridge, EncodingBridge, IgnoreAnalyzerBridge
| Enum Constant and Description |
|---|
BYTE_FIELD_BRIDGE
Persists byte properties in int index fields.
|
DOUBLE_FIELD_BRIDGE
Persists double properties in double index fields.
|
FLOAT_FIELD_BRIDGE
Persists float properties in float index fields.
|
INT_FIELD_BRIDGE
Persists int properties in int index fields.
|
LONG_FIELD_BRIDGE
Persists long properties in long index fields.
|
SHORT_FIELD_BRIDGE
Persists short properties in int index fields.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyToLuceneOptions(LuceneOptions luceneOptions,
String name,
Number value,
org.apache.lucene.document.Document document) |
Object |
get(String name,
org.apache.lucene.document.Document document)
Build the element object from the
Document |
String |
objectToString(Object object)
Convert the object representation to a string.
|
void |
set(String name,
Object value,
org.apache.lucene.document.Document document,
LuceneOptions luceneOptions)
Manipulate the document to index the given value.
|
static NumericFieldBridge |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NumericFieldBridge[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcreateNullMarker, getEncodingTypepublic static final NumericFieldBridge BYTE_FIELD_BRIDGE
public static final NumericFieldBridge SHORT_FIELD_BRIDGE
public static final NumericFieldBridge INT_FIELD_BRIDGE
public static final NumericFieldBridge FLOAT_FIELD_BRIDGE
public static final NumericFieldBridge DOUBLE_FIELD_BRIDGE
public static final NumericFieldBridge LONG_FIELD_BRIDGE
public static NumericFieldBridge[] values()
for (NumericFieldBridge c : NumericFieldBridge.values()) System.out.println(c);
public static NumericFieldBridge valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void set(String name, Object value, org.apache.lucene.document.Document document, LuceneOptions luceneOptions)
FieldBridge
A common implementation is to add a Field with the given name to document following
the parameters luceneOptions if the value is not null.
String fieldValue = convertToString(value);
luceneOptions.addFieldToDocument(name, fieldValue, document);
set in interface FieldBridgename - The field to add to the Lucene documentvalue - The actual value to indexdocument - The Lucene document into which we want to index the value.luceneOptions - Contains the parameters used for adding value to
the Lucene document.public final String objectToString(Object object)
TwoWayFieldBridgeobjectToString in interface StringBridgeobjectToString in interface TwoWayFieldBridgeobject - The object to index.null, but
can be empty.public Object get(String name, org.apache.lucene.document.Document document)
TwoWayFieldBridgeDocumentget in interface TwoWayFieldBridgename - field namedocument - documentprotected void applyToLuceneOptions(LuceneOptions luceneOptions, String name, Number value, org.apache.lucene.document.Document document)
Copyright © 2006-2023 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.