Class: AWSCDK::Kendra::CfnIndex::SearchProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
kendra/cfn_index.rb

Overview

Provides information about how a custom index field is used during a search.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(displayable: nil, facetable: nil, searchable: nil, sortable: nil) ⇒ SearchProperty

Returns a new instance of SearchProperty.

Parameters:

  • displayable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Determines whether the field is returned in the query response.

  • facetable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Indicates that the field can be used to create search facets, a count of results for each value in the field.

  • searchable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Determines whether the field is used in the search.

  • sortable (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Determines whether the field can be used to sort the results of a query.



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

#displayableBoolean, ... (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

#facetableBoolean, ... (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

#searchableBoolean, ... (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

#sortableBoolean, ... (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_propertiesObject



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_jsiiObject



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