Class FieldConfig (0.42.0)

public final class FieldConfig extends GeneratedMessageV3 implements FieldConfigOrBuilder

Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.

Protobuf type google.cloud.discoveryengine.v1alpha.FieldConfig

Static Fields

ADVANCED_SITE_SEARCH_DATA_SOURCES_FIELD_NUMBER

public static final int ADVANCED_SITE_SEARCH_DATA_SOURCES_FIELD_NUMBER
Field Value
Type Description
int

COMPLETABLE_OPTION_FIELD_NUMBER

public static final int COMPLETABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER

public static final int DYNAMIC_FACETABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

FIELD_PATH_FIELD_NUMBER

public static final int FIELD_PATH_FIELD_NUMBER
Field Value
Type Description
int

FIELD_TYPE_FIELD_NUMBER

public static final int FIELD_TYPE_FIELD_NUMBER
Field Value
Type Description
int

INDEXABLE_OPTION_FIELD_NUMBER

public static final int INDEXABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

KEY_PROPERTY_TYPE_FIELD_NUMBER

public static final int KEY_PROPERTY_TYPE_FIELD_NUMBER
Field Value
Type Description
int

RECS_FILTERABLE_OPTION_FIELD_NUMBER

public static final int RECS_FILTERABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

RETRIEVABLE_OPTION_FIELD_NUMBER

public static final int RETRIEVABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

SCHEMA_ORG_PATHS_FIELD_NUMBER

public static final int SCHEMA_ORG_PATHS_FIELD_NUMBER
Field Value
Type Description
int

SEARCHABLE_OPTION_FIELD_NUMBER

public static final int SEARCHABLE_OPTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static FieldConfig getDefaultInstance()
Returns
Type Description
FieldConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static FieldConfig.Builder newBuilder()
Returns
Type Description
FieldConfig.Builder

newBuilder(FieldConfig prototype)

public static FieldConfig.Builder newBuilder(FieldConfig prototype)
Parameter
Name Description
prototype FieldConfig
Returns
Type Description
FieldConfig.Builder

parseDelimitedFrom(InputStream input)

public static FieldConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static FieldConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FieldConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FieldConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static FieldConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static FieldConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FieldConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<FieldConfig> parser()
Returns
Type Description
Parser<FieldConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdvancedSiteSearchDataSources(int index)

public FieldConfig.AdvancedSiteSearchDataSource getAdvancedSiteSearchDataSources(int index)

If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

Assuming a page with <author, a> in meta tag, and <author, b> in page map: if this enum is set to METATAGS, we will only index <author, a>; if this enum is not set, we will merge them and index <author, [a, b]>.

repeated .google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
FieldConfig.AdvancedSiteSearchDataSource

The advancedSiteSearchDataSources at the given index.

getAdvancedSiteSearchDataSourcesCount()

public int getAdvancedSiteSearchDataSourcesCount()

If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

Assuming a page with <author, a> in meta tag, and <author, b> in page map: if this enum is set to METATAGS, we will only index <author, a>; if this enum is not set, we will merge them and index <author, [a, b]>.

repeated .google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;

Returns
Type Description
int

The count of advancedSiteSearchDataSources.

getAdvancedSiteSearchDataSourcesList()

public List<FieldConfig.AdvancedSiteSearchDataSource> getAdvancedSiteSearchDataSourcesList()

If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

Assuming a page with <author, a> in meta tag, and <author, b> in page map: if this enum is set to METATAGS, we will only index <author, a>; if this enum is not set, we will merge them and index <author, [a, b]>.

repeated .google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;

Returns
Type Description
List<AdvancedSiteSearchDataSource>

A list containing the advancedSiteSearchDataSources.

getAdvancedSiteSearchDataSourcesValue(int index)

public int getAdvancedSiteSearchDataSourcesValue(int index)

If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

Assuming a page with <author, a> in meta tag, and <author, b> in page map: if this enum is set to METATAGS, we will only index <author, a>; if this enum is not set, we will merge them and index <author, [a, b]>.

repeated .google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of advancedSiteSearchDataSources at the given index.

getAdvancedSiteSearchDataSourcesValueList()

public List<Integer> getAdvancedSiteSearchDataSourcesValueList()

If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged.

Assuming a page with <author, a> in meta tag, and <author, b> in page map: if this enum is set to METATAGS, we will only index <author, a>; if this enum is not set, we will merge them and index <author, [a, b]>.

repeated .google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for advancedSiteSearchDataSources.

getCompletableOption()

public FieldConfig.CompletableOption getCompletableOption()

If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery.

If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just string fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8;

Returns
Type Description
FieldConfig.CompletableOption

The completableOption.

getCompletableOptionValue()

public int getCompletableOptionValue()

If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery.

If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just string fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption completable_option = 8;

Returns
Type Description
int

The enum numeric value on the wire for completableOption.

getDefaultInstanceForType()

public FieldConfig getDefaultInstanceForType()
Returns
Type Description
FieldConfig

getDynamicFacetableOption()

public FieldConfig.DynamicFacetableOption getDynamicFacetableOption()

If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error will be returned.

If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as object and boolean, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4;

Returns
Type Description
FieldConfig.DynamicFacetableOption

The dynamicFacetableOption.

getDynamicFacetableOptionValue()

public int getDynamicFacetableOptionValue()

If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error will be returned.

If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as object and boolean, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption dynamic_facetable_option = 4;

Returns
Type Description
int

The enum numeric value on the wire for dynamicFacetableOption.

getFieldPath()

public String getFieldPath()

Required. Field path of the schema field. For example: title, description, release_info.release_year.

string field_path = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The fieldPath.

getFieldPathBytes()

public ByteString getFieldPathBytes()

Required. Field path of the schema field. For example: title, description, release_info.release_year.

string field_path = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for fieldPath.

getFieldType()

public FieldConfig.FieldType getFieldType()

Output only. Raw type of the field.

.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
FieldConfig.FieldType

The fieldType.

getFieldTypeValue()

public int getFieldTypeValue()

Output only. Raw type of the field.

.google.cloud.discoveryengine.v1alpha.FieldConfig.FieldType field_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for fieldType.

getIndexableOption()

public FieldConfig.IndexableOption getIndexableOption()

If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search.

If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as object and boolean and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3;

Returns
Type Description
FieldConfig.IndexableOption

The indexableOption.

getIndexableOptionValue()

public int getIndexableOptionValue()

If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search.

If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as object and boolean and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption indexable_option = 3;

Returns
Type Description
int

The enum numeric value on the wire for indexableOption.

getKeyPropertyType()

public String getKeyPropertyType()

Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property.

Example types are title, description. Full list is defined by keyPropertyMapping in the schema field annotation.

If the schema field has a KeyPropertyMapping annotation, indexable_option and searchable_option of this field cannot be modified.

string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The keyPropertyType.

getKeyPropertyTypeBytes()

public ByteString getKeyPropertyTypeBytes()

Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property.

Example types are title, description. Full list is defined by keyPropertyMapping in the schema field annotation.

If the schema field has a KeyPropertyMapping annotation, indexable_option and searchable_option of this field cannot be modified.

string key_property_type = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for keyPropertyType.

getParserForType()

public Parser<FieldConfig> getParserForType()
Returns
Type Description
Parser<FieldConfig>
Overrides

getRecsFilterableOption()

public FieldConfig.FilterableOption getRecsFilterableOption()

If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend.

If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported.

If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options.

When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.

.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9;

Returns
Type Description
FieldConfig.FilterableOption

The recsFilterableOption.

getRecsFilterableOptionValue()

public int getRecsFilterableOptionValue()

If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend.

If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported.

If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options.

When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.

.google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption recs_filterable_option = 9;

Returns
Type Description
int

The enum numeric value on the wire for recsFilterableOption.

getRetrievableOption()

public FieldConfig.RetrievableOption getRetrievableOption()

If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results.

If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as object and boolean, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6;

Returns
Type Description
FieldConfig.RetrievableOption

The retrievableOption.

getRetrievableOptionValue()

public int getRetrievableOptionValue()

If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results.

If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as object and boolean, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption retrievable_option = 6;

Returns
Type Description
int

The enum numeric value on the wire for retrievableOption.

getSchemaOrgPaths(int index)

public String getSchemaOrgPaths(int index)

Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at schema.org.

It is only used on advanced site search schema.

Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from _root, with a period . as the delimiter. Examples:

  • Publish date of the root: _root.datePublished
  • Publish date of the reviews: _root.review.datePublished

repeated string schema_org_paths = 11;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The schemaOrgPaths at the given index.

getSchemaOrgPathsBytes(int index)

public ByteString getSchemaOrgPathsBytes(int index)

Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at schema.org.

It is only used on advanced site search schema.

Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from _root, with a period . as the delimiter. Examples:

  • Publish date of the root: _root.datePublished
  • Publish date of the reviews: _root.review.datePublished

repeated string schema_org_paths = 11;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the schemaOrgPaths at the given index.

getSchemaOrgPathsCount()

public int getSchemaOrgPathsCount()

Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at schema.org.

It is only used on advanced site search schema.

Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from _root, with a period . as the delimiter. Examples:

  • Publish date of the root: _root.datePublished
  • Publish date of the reviews: _root.review.datePublished

repeated string schema_org_paths = 11;

Returns
Type Description
int

The count of schemaOrgPaths.

getSchemaOrgPathsList()

public ProtocolStringList getSchemaOrgPathsList()

Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at schema.org.

It is only used on advanced site search schema.

Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from _root, with a period . as the delimiter. Examples:

  • Publish date of the root: _root.datePublished
  • Publish date of the reviews: _root.review.datePublished

repeated string schema_org_paths = 11;

Returns
Type Description
ProtocolStringList

A list containing the schemaOrgPaths.

getSearchableOption()

public FieldConfig.SearchableOption getSearchableOption()

If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search.

If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields.

If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only string fields that have no key property mapping support setting searchable_option.

For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5;

Returns
Type Description
FieldConfig.SearchableOption

The searchableOption.

getSearchableOptionValue()

public int getSearchableOptionValue()

If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search.

If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields.

If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only string fields that have no key property mapping support setting searchable_option.

For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw INVALID_ARGUMENT error.

.google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption searchable_option = 5;

Returns
Type Description
int

The enum numeric value on the wire for searchableOption.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public FieldConfig.Builder newBuilderForType()
Returns
Type Description
FieldConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FieldConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
FieldConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public FieldConfig.Builder toBuilder()
Returns
Type Description
FieldConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException