public enum SearchFieldType extends Enum<SearchFieldType>
field
for indexing and searching.SearchFieldConfiguration.getType()
Enum Constant and Description |
---|
DATE
The type of a field containing a
Date value. |
DOUBLE
The type of a field containing a
Double value. |
FLOAT
The type of a field containing a
Float value. |
INTEGER
The type of a field containing an
Integer value. |
LONG
The type of a field containing a
Long value. |
STRING
The type of a
String field containing an identifier. |
TEXT
The type of a
String field with arbitrary text. |
Modifier and Type | Field and Description |
---|---|
private Class<?> |
fieldClass |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getFieldClass()
This method gets the
Class reflecting the values that can be stored in a field of this type. |
boolean |
isNormalized()
This method determines if fields of this type are normalized.
|
static SearchFieldType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SearchFieldType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SearchFieldType TEXT
String
field with arbitrary text. The content of the field will be normalized for
searches in the search-index as well as in queries
. The
normalization may contain things like:
case
of the textpublic static final SearchFieldType STRING
public static final SearchFieldType INTEGER
Integer
value. For values like identifiers, file-size, etc. it
is better to use LONG
however this will consume more space in your search-index. So if you want
to save space, it might be an option to use INTEGER
(at least for values where you know that the
range/precision is sufficient).public static final SearchFieldType LONG
Long
value.public static final SearchFieldType FLOAT
public static final SearchFieldType DOUBLE
Double
value.public static final SearchFieldType DATE
Date
value.private final Class<?> fieldClass
getFieldClass()
public static SearchFieldType[] values()
for (SearchFieldType c : SearchFieldType.values()) System.out.println(c);
public static SearchFieldType 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 Class<?> getFieldClass()
Class
reflecting the values that can be stored in a field of this type.public boolean isNormalized()
true
if normalized, false
otherwise (if the field is a keyword).TEXT
Copyright © 2001–2014 mmm-Team. All rights reserved.