Class FieldConfig.Builder (0.40.0)

public static final class FieldConfig.Builder extends GeneratedMessageV3.Builder<FieldConfig.Builder> 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 Methods

getDescriptor()

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

Methods

addAdvancedSiteSearchDataSources(FieldConfig.AdvancedSiteSearchDataSource value)

public FieldConfig.Builder addAdvancedSiteSearchDataSources(FieldConfig.AdvancedSiteSearchDataSource value)

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
value FieldConfig.AdvancedSiteSearchDataSource

The advancedSiteSearchDataSources to add.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

addAdvancedSiteSearchDataSourcesValue(int value)

public FieldConfig.Builder addAdvancedSiteSearchDataSourcesValue(int value)

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
value int

The enum numeric value on the wire for advancedSiteSearchDataSources to add.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

addAllAdvancedSiteSearchDataSources(Iterable<? extends FieldConfig.AdvancedSiteSearchDataSource> values)

public FieldConfig.Builder addAllAdvancedSiteSearchDataSources(Iterable<? extends FieldConfig.AdvancedSiteSearchDataSource> values)

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
values Iterable<? extends com.google.cloud.discoveryengine.v1alpha.FieldConfig.AdvancedSiteSearchDataSource>

The advancedSiteSearchDataSources to add.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

addAllAdvancedSiteSearchDataSourcesValue(Iterable<Integer> values)

public FieldConfig.Builder addAllAdvancedSiteSearchDataSourcesValue(Iterable<Integer> values)

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
values Iterable<Integer>

The enum numeric values on the wire for advancedSiteSearchDataSources to add.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public FieldConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FieldConfig.Builder
Overrides

build()

public FieldConfig build()
Returns
Type Description
FieldConfig

buildPartial()

public FieldConfig buildPartial()
Returns
Type Description
FieldConfig

clear()

public FieldConfig.Builder clear()
Returns
Type Description
FieldConfig.Builder
Overrides

clearAdvancedSiteSearchDataSources()

public FieldConfig.Builder clearAdvancedSiteSearchDataSources()

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
FieldConfig.Builder

This builder for chaining.

clearCompletableOption()

public FieldConfig.Builder clearCompletableOption()

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.Builder

This builder for chaining.

clearDynamicFacetableOption()

public FieldConfig.Builder clearDynamicFacetableOption()

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.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public FieldConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
FieldConfig.Builder
Overrides

clearFieldPath()

public FieldConfig.Builder clearFieldPath()

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
FieldConfig.Builder

This builder for chaining.

clearFieldType()

public FieldConfig.Builder clearFieldType()

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.Builder

This builder for chaining.

clearIndexableOption()

public FieldConfig.Builder clearIndexableOption()

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.Builder

This builder for chaining.

clearKeyPropertyType()

public FieldConfig.Builder clearKeyPropertyType()

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
FieldConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public FieldConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
FieldConfig.Builder
Overrides

clearRecsFilterableOption()

public FieldConfig.Builder clearRecsFilterableOption()

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.Builder

This builder for chaining.

clearRetrievableOption()

public FieldConfig.Builder clearRetrievableOption()

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.Builder

This builder for chaining.

clearSearchableOption()

public FieldConfig.Builder clearSearchableOption()

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.Builder

This builder for chaining.

clone()

public FieldConfig.Builder clone()
Returns
Type Description
FieldConfig.Builder
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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FieldConfig other)

public FieldConfig.Builder mergeFrom(FieldConfig other)
Parameter
Name Description
other FieldConfig
Returns
Type Description
FieldConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public FieldConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
FieldConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public FieldConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
FieldConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final FieldConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FieldConfig.Builder
Overrides

setAdvancedSiteSearchDataSources(int index, FieldConfig.AdvancedSiteSearchDataSource value)

public FieldConfig.Builder setAdvancedSiteSearchDataSources(int index, FieldConfig.AdvancedSiteSearchDataSource value)

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;

Parameters
Name Description
index int

The index to set the value at.

value FieldConfig.AdvancedSiteSearchDataSource

The advancedSiteSearchDataSources to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setAdvancedSiteSearchDataSourcesValue(int index, int value)

public FieldConfig.Builder setAdvancedSiteSearchDataSourcesValue(int index, int value)

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;

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for advancedSiteSearchDataSources to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setCompletableOption(FieldConfig.CompletableOption value)

public FieldConfig.Builder setCompletableOption(FieldConfig.CompletableOption value)

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;

Parameter
Name Description
value FieldConfig.CompletableOption

The completableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setCompletableOptionValue(int value)

public FieldConfig.Builder setCompletableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for completableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setDynamicFacetableOption(FieldConfig.DynamicFacetableOption value)

public FieldConfig.Builder setDynamicFacetableOption(FieldConfig.DynamicFacetableOption value)

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;

Parameter
Name Description
value FieldConfig.DynamicFacetableOption

The dynamicFacetableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setDynamicFacetableOptionValue(int value)

public FieldConfig.Builder setDynamicFacetableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for dynamicFacetableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public FieldConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
FieldConfig.Builder
Overrides

setFieldPath(String value)

public FieldConfig.Builder setFieldPath(String value)

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

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

Parameter
Name Description
value String

The fieldPath to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setFieldPathBytes(ByteString value)

public FieldConfig.Builder setFieldPathBytes(ByteString value)

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

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

Parameter
Name Description
value ByteString

The bytes for fieldPath to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setFieldType(FieldConfig.FieldType value)

public FieldConfig.Builder setFieldType(FieldConfig.FieldType value)

Output only. Raw type of the field.

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

Parameter
Name Description
value FieldConfig.FieldType

The fieldType to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setFieldTypeValue(int value)

public FieldConfig.Builder setFieldTypeValue(int value)

Output only. Raw type of the field.

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

Parameter
Name Description
value int

The enum numeric value on the wire for fieldType to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setIndexableOption(FieldConfig.IndexableOption value)

public FieldConfig.Builder setIndexableOption(FieldConfig.IndexableOption value)

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;

Parameter
Name Description
value FieldConfig.IndexableOption

The indexableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setIndexableOptionValue(int value)

public FieldConfig.Builder setIndexableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for indexableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setKeyPropertyType(String value)

public FieldConfig.Builder setKeyPropertyType(String value)

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];

Parameter
Name Description
value String

The keyPropertyType to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setKeyPropertyTypeBytes(ByteString value)

public FieldConfig.Builder setKeyPropertyTypeBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for keyPropertyType to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setRecsFilterableOption(FieldConfig.FilterableOption value)

public FieldConfig.Builder setRecsFilterableOption(FieldConfig.FilterableOption value)

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;

Parameter
Name Description
value FieldConfig.FilterableOption

The recsFilterableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setRecsFilterableOptionValue(int value)

public FieldConfig.Builder setRecsFilterableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for recsFilterableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public FieldConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
FieldConfig.Builder
Overrides

setRetrievableOption(FieldConfig.RetrievableOption value)

public FieldConfig.Builder setRetrievableOption(FieldConfig.RetrievableOption value)

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;

Parameter
Name Description
value FieldConfig.RetrievableOption

The retrievableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setRetrievableOptionValue(int value)

public FieldConfig.Builder setRetrievableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for retrievableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setSearchableOption(FieldConfig.SearchableOption value)

public FieldConfig.Builder setSearchableOption(FieldConfig.SearchableOption value)

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;

Parameter
Name Description
value FieldConfig.SearchableOption

The searchableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setSearchableOptionValue(int value)

public FieldConfig.Builder setSearchableOptionValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for searchableOption to set.

Returns
Type Description
FieldConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final FieldConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
FieldConfig.Builder
Overrides