Struct google_api_proto::google::cloud::discoveryengine::v1alpha::FieldConfig
source · pub struct FieldConfig {
pub field_path: String,
pub field_type: i32,
pub indexable_option: i32,
pub dynamic_facetable_option: i32,
pub searchable_option: i32,
pub retrievable_option: i32,
pub completable_option: i32,
pub recs_filterable_option: i32,
pub key_property_type: String,
pub advanced_site_search_data_sources: Vec<i32>,
pub schema_org_paths: Vec<String>,
}
Expand description
Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.
Fields§
§field_path: String
Required. Field path of the schema field.
For example: title
, description
, release_info.release_year
.
field_type: i32
Output only. Raw type of the field.
indexable_option: i32
If [indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option] is [INDEXABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_ENABLED], field values are indexed so that it can be filtered or faceted in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
If
[indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
is unset, the server behavior defaults to
[INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.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][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
setting, and setting
[indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
for those fields will throw INVALID_ARGUMENT
error.
dynamic_facetable_option: i32
If
[dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
is
[DYNAMIC_FACETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_ENABLED],
field values are available for dynamic facet. Could only be
[DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.DYNAMIC_FACETABLE_DISABLED]
if
[FieldConfig.indexable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.indexable_option]
is
[INDEXABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.IndexableOption.INDEXABLE_DISABLED].
Otherwise, an INVALID_ARGUMENT
error will be returned.
If
[dynamic_facetable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
is unset, the server behavior defaults to
[DYNAMIC_FACETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.DynamicFacetableOption.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][google.cloud.discoveryengine.v1alpha.FieldConfig.dynamic_facetable_option]
for those fields will throw INVALID_ARGUMENT
error.
searchable_option: i32
If [searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option] is [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED], field values are searchable by text queries in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search].
If [SEARCHABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_ENABLED] but field type is numerical, field values will not be searchable by text queries in [SearchService.Search][google.cloud.discoveryengine.v1alpha.SearchService.Search], as there are no text values associated to numerical fields.
If
[searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
is unset, the server behavior defaults to
[SEARCHABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.SearchableOption.SEARCHABLE_DISABLED]
for fields that support setting searchable options. Only string
fields
that have no key property mapping support setting
[searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option].
For those fields that do not support setting searchable options, the server
will skip searchable option setting, and setting
[searchable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.searchable_option]
for those fields will throw INVALID_ARGUMENT
error.
retrievable_option: i32
If [retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option] is [RETRIEVABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.RETRIEVABLE_ENABLED], field values are included in the search results.
If
[retrievable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
is unset, the server behavior defaults to
[RETRIEVABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.RetrievableOption.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][google.cloud.discoveryengine.v1alpha.FieldConfig.retrievable_option]
for those fields will throw INVALID_ARGUMENT
error.
completable_option: i32
If [completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option] is [COMPLETABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.COMPLETABLE_ENABLED], field values are directly used and returned as suggestions for Autocomplete in [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery].
If
[completable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
is unset, the server behavior defaults to
[COMPLETABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.CompletableOption.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][google.cloud.discoveryengine.v1alpha.FieldConfig.completable_option]
for those fields will throw INVALID_ARGUMENT
error.
recs_filterable_option: i32
If [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] is [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED], field values are filterable by filter expression in [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend].
If [FILTERABLE_ENABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.FILTERABLE_ENABLED] but the field type is numerical, field values are not filterable by text queries in [RecommendationService.Recommend][google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend]. Only textual fields are supported.
If [recs_filterable_option][google.cloud.discoveryengine.v1alpha.FieldConfig.recs_filterable_option] is unset, the default setting is [FILTERABLE_DISABLED][google.cloud.discoveryengine.v1alpha.FieldConfig.FilterableOption.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.
key_property_type: String
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.
advanced_site_search_data_sources: Vec<i32>
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\]>
.
schema_org_paths: Vec<String>
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
Implementations§
source§impl FieldConfig
impl FieldConfig
sourcepub fn field_type(&self) -> FieldType
pub fn field_type(&self) -> FieldType
Returns the enum value of field_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_field_type(&mut self, value: FieldType)
pub fn set_field_type(&mut self, value: FieldType)
Sets field_type
to the provided enum value.
sourcepub fn indexable_option(&self) -> IndexableOption
pub fn indexable_option(&self) -> IndexableOption
Returns the enum value of indexable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_indexable_option(&mut self, value: IndexableOption)
pub fn set_indexable_option(&mut self, value: IndexableOption)
Sets indexable_option
to the provided enum value.
sourcepub fn dynamic_facetable_option(&self) -> DynamicFacetableOption
pub fn dynamic_facetable_option(&self) -> DynamicFacetableOption
Returns the enum value of dynamic_facetable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_dynamic_facetable_option(&mut self, value: DynamicFacetableOption)
pub fn set_dynamic_facetable_option(&mut self, value: DynamicFacetableOption)
Sets dynamic_facetable_option
to the provided enum value.
sourcepub fn searchable_option(&self) -> SearchableOption
pub fn searchable_option(&self) -> SearchableOption
Returns the enum value of searchable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_searchable_option(&mut self, value: SearchableOption)
pub fn set_searchable_option(&mut self, value: SearchableOption)
Sets searchable_option
to the provided enum value.
sourcepub fn retrievable_option(&self) -> RetrievableOption
pub fn retrievable_option(&self) -> RetrievableOption
Returns the enum value of retrievable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_retrievable_option(&mut self, value: RetrievableOption)
pub fn set_retrievable_option(&mut self, value: RetrievableOption)
Sets retrievable_option
to the provided enum value.
sourcepub fn completable_option(&self) -> CompletableOption
pub fn completable_option(&self) -> CompletableOption
Returns the enum value of completable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_completable_option(&mut self, value: CompletableOption)
pub fn set_completable_option(&mut self, value: CompletableOption)
Sets completable_option
to the provided enum value.
sourcepub fn recs_filterable_option(&self) -> FilterableOption
pub fn recs_filterable_option(&self) -> FilterableOption
Returns the enum value of recs_filterable_option
, or the default if the field is set to an invalid enum value.
sourcepub fn set_recs_filterable_option(&mut self, value: FilterableOption)
pub fn set_recs_filterable_option(&mut self, value: FilterableOption)
Sets recs_filterable_option
to the provided enum value.
sourcepub fn advanced_site_search_data_sources(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AdvancedSiteSearchDataSource>>
pub fn advanced_site_search_data_sources( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<AdvancedSiteSearchDataSource>>
Returns an iterator which yields the valid enum values contained in advanced_site_search_data_sources
.
sourcepub fn push_advanced_site_search_data_sources(
&mut self,
value: AdvancedSiteSearchDataSource,
)
pub fn push_advanced_site_search_data_sources( &mut self, value: AdvancedSiteSearchDataSource, )
Appends the provided enum value to advanced_site_search_data_sources
.
Trait Implementations§
source§impl Clone for FieldConfig
impl Clone for FieldConfig
source§fn clone(&self) -> FieldConfig
fn clone(&self) -> FieldConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FieldConfig
impl Debug for FieldConfig
source§impl Default for FieldConfig
impl Default for FieldConfig
source§impl Message for FieldConfig
impl Message for FieldConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for FieldConfig
impl PartialEq for FieldConfig
source§fn eq(&self, other: &FieldConfig) -> bool
fn eq(&self, other: &FieldConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for FieldConfig
Auto Trait Implementations§
impl Freeze for FieldConfig
impl RefUnwindSafe for FieldConfig
impl Send for FieldConfig
impl Sync for FieldConfig
impl Unpin for FieldConfig
impl UnwindSafe for FieldConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request