public static final class Field.BuilderA field builder. Fields must have a name, and optionally a locale and at most one of text, html, atom or date.
Methods
build()
public Field build()Builds a field using this builder. The field must have a valid name, string value, type.
| Returns | |
|---|---|
| Type | Description |
Field |
a Field built by this builder |
setAtom(String atom)
public Field.Builder setAtom(String atom)Sets an atomic value, indivisible text, for the field.
| Parameter | |
|---|---|
| Name | Description |
atom |
Stringthe indivisible text of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setDate(Date date)
public Field.Builder setDate(Date date)Sets a date associated with the field.
| Parameter | |
|---|---|
| Name | Description |
date |
Datethe date of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setGeoPoint(GeoPoint geoPoint)
public Field.Builder setGeoPoint(GeoPoint geoPoint)Sets a GeoPoint value for the field.
| Parameter | |
|---|---|
| Name | Description |
geoPoint |
GeoPointthe GeoPoint value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setHTML(String html)
public Field.Builder setHTML(String html)Sets a HTML value for the field.
| Parameter | |
|---|---|
| Name | Description |
html |
Stringthe HTML value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setLocale(Locale locale)
public Field.Builder setLocale(Locale locale)Sets the Locale of the field value. If none is given, then the locale of the document will be used.
| Parameter | |
|---|---|
| Name | Description |
locale |
Localethe locale the field value is written in |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setName(String name)
public Field.Builder setName(String name)Sets a name for the field. The field name length must be between 1 and FieldChecker#MAXIMUM_NAME_LENGTH and it should match com.google.appengine.api.search.checkers.SearchApiLimits#FIELD_NAME_PATTERN.
| Parameter | |
|---|---|
| Name | Description |
name |
Stringthe name of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setNumber(double number)
public Field.Builder setNumber(double number)Sets a numeric value for the field. The number must be between
com.google.appengine.api.search.checkers.SearchApiLimits#MINIMUM_NUMBER_VALUE and
com.google.appengine.api.search.checkers.SearchApiLimits#MAXIMUM_NUMBER_VALUE.
| Parameter | |
|---|---|
| Name | Description |
number |
doublethe numeric value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setText(String text)
public Field.Builder setText(String text)Sets a text value for the field.
| Parameter | |
|---|---|
| Name | Description |
text |
Stringthe text value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setTokenizedPrefix(String tokenizedPrefix)
public Field.Builder setTokenizedPrefix(String tokenizedPrefix)Sets a tokenized prefix value for the field.
| Parameter | |
|---|---|
| Name | Description |
tokenizedPrefix |
Stringthe string value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setUntokenizedPrefix(String untokenizedPrefix)
public Field.Builder setUntokenizedPrefix(String untokenizedPrefix)Sets an untokenized prefix value for the field.
| Parameter | |
|---|---|
| Name | Description |
untokenizedPrefix |
Stringthe string value of the field |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |
setVector(List<Double> vector)
public Field.Builder setVector(List<Double> vector)Sets a vector value for the field.
| Parameter | |
|---|---|
| Name | Description |
vector |
List<Double>a list of Double values forming a vector field value |
| Returns | |
|---|---|
| Type | Description |
Field.Builder |
this builder |