#[non_exhaustive]
pub struct IndexField {
Show 13 fields pub index_field_name: String, pub index_field_type: IndexFieldType, pub int_options: Option<IntOptions>, pub double_options: Option<DoubleOptions>, pub literal_options: Option<LiteralOptions>, pub text_options: Option<TextOptions>, pub date_options: Option<DateOptions>, pub lat_lon_options: Option<LatLonOptions>, pub int_array_options: Option<IntArrayOptions>, pub double_array_options: Option<DoubleArrayOptions>, pub literal_array_options: Option<LiteralArrayOptions>, pub text_array_options: Option<TextArrayOptions>, pub date_array_options: Option<DateArrayOptions>,
}
Expand description

Configuration information for a field in the index, including its name, type, and options. The supported options depend on the IndexFieldType.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§index_field_name: String

A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.

Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.

The name score is reserved and cannot be used as a field name. To reference a document's ID, you can use the name _id.

§index_field_type: IndexFieldType

The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

§int_options: Option<IntOptions>

Options for a 64-bit signed integer field. Present if IndexFieldType specifies the field is of type int. All options are enabled by default.

§double_options: Option<DoubleOptions>

Options for a double-precision 64-bit floating point field. Present if IndexFieldType specifies the field is of type double. All options are enabled by default.

§literal_options: Option<LiteralOptions>

Options for literal field. Present if IndexFieldType specifies the field is of type literal. All options are enabled by default.

§text_options: Option<TextOptions>

Options for text field. Present if IndexFieldType specifies the field is of type text. A text field is always searchable. All options are enabled by default.

§date_options: Option<DateOptions>

Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if IndexFieldType specifies the field is of type date. All options are enabled by default.

§lat_lon_options: Option<LatLonOptions>

Options for a latlon field. A latlon field contains a location stored as a latitude and longitude value pair. Present if IndexFieldType specifies the field is of type latlon. All options are enabled by default.

§int_array_options: Option<IntArrayOptions>

Options for a field that contains an array of 64-bit signed integers. Present if IndexFieldType specifies the field is of type int-array. All options are enabled by default.

§double_array_options: Option<DoubleArrayOptions>

Options for a field that contains an array of double-precision 64-bit floating point values. Present if IndexFieldType specifies the field is of type double-array. All options are enabled by default.

§literal_array_options: Option<LiteralArrayOptions>

Options for a field that contains an array of literal strings. Present if IndexFieldType specifies the field is of type literal-array. All options are enabled by default.

§text_array_options: Option<TextArrayOptions>

Options for a field that contains an array of text strings. Present if IndexFieldType specifies the field is of type text-array. A text-array field is always searchable. All options are enabled by default.

§date_array_options: Option<DateArrayOptions>

Options for a field that contains an array of dates. Present if IndexFieldType specifies the field is of type date-array. All options are enabled by default.

Implementations§

source§

impl IndexField

source

pub fn index_field_name(&self) -> &str

A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.

Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.

The name score is reserved and cannot be used as a field name. To reference a document's ID, you can use the name _id.

source

pub fn index_field_type(&self) -> &IndexFieldType

The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

source

pub fn int_options(&self) -> Option<&IntOptions>

Options for a 64-bit signed integer field. Present if IndexFieldType specifies the field is of type int. All options are enabled by default.

source

pub fn double_options(&self) -> Option<&DoubleOptions>

Options for a double-precision 64-bit floating point field. Present if IndexFieldType specifies the field is of type double. All options are enabled by default.

source

pub fn literal_options(&self) -> Option<&LiteralOptions>

Options for literal field. Present if IndexFieldType specifies the field is of type literal. All options are enabled by default.

source

pub fn text_options(&self) -> Option<&TextOptions>

Options for text field. Present if IndexFieldType specifies the field is of type text. A text field is always searchable. All options are enabled by default.

source

pub fn date_options(&self) -> Option<&DateOptions>

Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if IndexFieldType specifies the field is of type date. All options are enabled by default.

source

pub fn lat_lon_options(&self) -> Option<&LatLonOptions>

Options for a latlon field. A latlon field contains a location stored as a latitude and longitude value pair. Present if IndexFieldType specifies the field is of type latlon. All options are enabled by default.

source

pub fn int_array_options(&self) -> Option<&IntArrayOptions>

Options for a field that contains an array of 64-bit signed integers. Present if IndexFieldType specifies the field is of type int-array. All options are enabled by default.

source

pub fn double_array_options(&self) -> Option<&DoubleArrayOptions>

Options for a field that contains an array of double-precision 64-bit floating point values. Present if IndexFieldType specifies the field is of type double-array. All options are enabled by default.

source

pub fn literal_array_options(&self) -> Option<&LiteralArrayOptions>

Options for a field that contains an array of literal strings. Present if IndexFieldType specifies the field is of type literal-array. All options are enabled by default.

source

pub fn text_array_options(&self) -> Option<&TextArrayOptions>

Options for a field that contains an array of text strings. Present if IndexFieldType specifies the field is of type text-array. A text-array field is always searchable. All options are enabled by default.

source

pub fn date_array_options(&self) -> Option<&DateArrayOptions>

Options for a field that contains an array of dates. Present if IndexFieldType specifies the field is of type date-array. All options are enabled by default.

source§

impl IndexField

source

pub fn builder() -> IndexFieldBuilder

Creates a new builder-style object to manufacture IndexField.

Trait Implementations§

source§

impl Clone for IndexField

source§

fn clone(&self) -> IndexField

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for IndexField

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for IndexField

source§

fn eq(&self, other: &IndexField) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for IndexField

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Unshared, Shared> IntoShared<Shared> for Unsharedwhere Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more