Class: AWSCDK::Kendra::CfnIndex::SearchProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Kendra::CfnIndex::SearchProperty
- Defined in:
- kendra/cfn_index.rb
Overview
Provides information about how a custom index field is used during a search.
Instance Attribute Summary collapse
-
#displayable ⇒ Boolean, ...
readonly
Determines whether the field is returned in the query response.
-
#facetable ⇒ Boolean, ...
readonly
Indicates that the field can be used to create search facets, a count of results for each value in the field.
-
#searchable ⇒ Boolean, ...
readonly
Determines whether the field is used in the search.
-
#sortable ⇒ Boolean, ...
readonly
Determines whether the field can be used to sort the results of a query.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(displayable: nil, facetable: nil, searchable: nil, sortable: nil) ⇒ SearchProperty
constructor
A new instance of SearchProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(displayable: nil, facetable: nil, searchable: nil, sortable: nil) ⇒ SearchProperty
Returns a new instance of SearchProperty.
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# File 'kendra/cfn_index.rb', line 1022 def initialize(displayable: nil, facetable: nil, searchable: nil, sortable: nil) @displayable = displayable Jsii::Type.check_type(@displayable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "displayable") unless @displayable.nil? @facetable = facetable Jsii::Type.check_type(@facetable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "facetable") unless @facetable.nil? @searchable = searchable Jsii::Type.check_type(@searchable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "searchable") unless @searchable.nil? @sortable = sortable Jsii::Type.check_type(@sortable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "sortable") unless @sortable.nil? end |
Instance Attribute Details
#displayable ⇒ Boolean, ... (readonly)
Determines whether the field is returned in the query response.
The default is true .
1039 1040 1041 |
# File 'kendra/cfn_index.rb', line 1039 def displayable @displayable end |
#facetable ⇒ Boolean, ... (readonly)
Indicates that the field can be used to create search facets, a count of results for each value in the field.
The default is false .
1046 1047 1048 |
# File 'kendra/cfn_index.rb', line 1046 def facetable @facetable end |
#searchable ⇒ Boolean, ... (readonly)
Determines whether the field is used in the search.
If the Searchable field is true , you can use relevance tuning to manually tune how Amazon Kendra weights the field in the search. The default is true for string fields and false for number and date fields.
1053 1054 1055 |
# File 'kendra/cfn_index.rb', line 1053 def searchable @searchable end |
#sortable ⇒ Boolean, ... (readonly)
Determines whether the field can be used to sort the results of a query.
The default is false .
1060 1061 1062 |
# File 'kendra/cfn_index.rb', line 1060 def sortable @sortable end |
Class Method Details
.jsii_properties ⇒ Object
1062 1063 1064 1065 1066 1067 1068 1069 |
# File 'kendra/cfn_index.rb', line 1062 def self.jsii_properties { :displayable => "displayable", :facetable => "facetable", :searchable => "searchable", :sortable => "sortable", } end |
Instance Method Details
#to_jsii ⇒ Object
1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 |
# File 'kendra/cfn_index.rb', line 1071 def to_jsii result = {} result.merge!({ "displayable" => @displayable, "facetable" => @facetable, "searchable" => @searchable, "sortable" => @sortable, }) result.compact end |