#[non_exhaustive]
pub struct IndexField { /* private fields */ }
Expand description

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

Implementations§

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.

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.

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

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.

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

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.

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.

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.

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.

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.

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.

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.

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.

Creates a new builder-style object to manufacture IndexField.

Examples found in repository?
src/xml_deser.rs (line 2520)
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
pub fn deser_structure_crate_model_index_field(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IndexField, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::IndexField::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("IndexFieldName") /* IndexFieldName com.amazonaws.cloudsearch#IndexField$IndexFieldName */ =>  {
                let var_85 =
                    Some(
                        Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            .into()
                        )
                        ?
                    )
                ;
                builder = builder.set_index_field_name(var_85);
            }
            ,
            s if s.matches("IndexFieldType") /* IndexFieldType com.amazonaws.cloudsearch#IndexField$IndexFieldType */ =>  {
                let var_86 =
                    Some(
                        Result::<crate::model::IndexFieldType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
                            crate::model::IndexFieldType::from(
                                aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
                            )
                        )
                        ?
                    )
                ;
                builder = builder.set_index_field_type(var_86);
            }
            ,
            s if s.matches("IntOptions") /* IntOptions com.amazonaws.cloudsearch#IndexField$IntOptions */ =>  {
                let var_87 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_int_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_int_options(var_87);
            }
            ,
            s if s.matches("DoubleOptions") /* DoubleOptions com.amazonaws.cloudsearch#IndexField$DoubleOptions */ =>  {
                let var_88 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_double_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_double_options(var_88);
            }
            ,
            s if s.matches("LiteralOptions") /* LiteralOptions com.amazonaws.cloudsearch#IndexField$LiteralOptions */ =>  {
                let var_89 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_literal_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_literal_options(var_89);
            }
            ,
            s if s.matches("TextOptions") /* TextOptions com.amazonaws.cloudsearch#IndexField$TextOptions */ =>  {
                let var_90 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_text_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_text_options(var_90);
            }
            ,
            s if s.matches("DateOptions") /* DateOptions com.amazonaws.cloudsearch#IndexField$DateOptions */ =>  {
                let var_91 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_date_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_date_options(var_91);
            }
            ,
            s if s.matches("LatLonOptions") /* LatLonOptions com.amazonaws.cloudsearch#IndexField$LatLonOptions */ =>  {
                let var_92 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_lat_lon_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_lat_lon_options(var_92);
            }
            ,
            s if s.matches("IntArrayOptions") /* IntArrayOptions com.amazonaws.cloudsearch#IndexField$IntArrayOptions */ =>  {
                let var_93 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_int_array_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_int_array_options(var_93);
            }
            ,
            s if s.matches("DoubleArrayOptions") /* DoubleArrayOptions com.amazonaws.cloudsearch#IndexField$DoubleArrayOptions */ =>  {
                let var_94 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_double_array_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_double_array_options(var_94);
            }
            ,
            s if s.matches("LiteralArrayOptions") /* LiteralArrayOptions com.amazonaws.cloudsearch#IndexField$LiteralArrayOptions */ =>  {
                let var_95 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_literal_array_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_literal_array_options(var_95);
            }
            ,
            s if s.matches("TextArrayOptions") /* TextArrayOptions com.amazonaws.cloudsearch#IndexField$TextArrayOptions */ =>  {
                let var_96 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_text_array_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_text_array_options(var_96);
            }
            ,
            s if s.matches("DateArrayOptions") /* DateArrayOptions com.amazonaws.cloudsearch#IndexField$DateArrayOptions */ =>  {
                let var_97 =
                    Some(
                        crate::xml_deser::deser_structure_crate_model_date_array_options(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_date_array_options(var_97);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more