/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace kendra { namespace Model { /** *

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

See Also:

AWS API * Reference

*/ class Search { public: AWS_KENDRA_API Search(); AWS_KENDRA_API Search(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Search& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_KENDRA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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 .

*/ inline bool GetFacetable() const{ return m_facetable; } /** *

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 .

*/ inline bool FacetableHasBeenSet() const { return m_facetableHasBeenSet; } /** *

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 .

*/ inline void SetFacetable(bool value) { m_facetableHasBeenSet = true; m_facetable = value; } /** *

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 .

*/ inline Search& WithFacetable(bool value) { SetFacetable(value); return *this;} /** *

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.

*/ inline bool GetSearchable() const{ return m_searchable; } /** *

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.

*/ inline bool SearchableHasBeenSet() const { return m_searchableHasBeenSet; } /** *

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.

*/ inline void SetSearchable(bool value) { m_searchableHasBeenSet = true; m_searchable = value; } /** *

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.

*/ inline Search& WithSearchable(bool value) { SetSearchable(value); return *this;} /** *

Determines whether the field is returned in the query response. The default * is true.

*/ inline bool GetDisplayable() const{ return m_displayable; } /** *

Determines whether the field is returned in the query response. The default * is true.

*/ inline bool DisplayableHasBeenSet() const { return m_displayableHasBeenSet; } /** *

Determines whether the field is returned in the query response. The default * is true.

*/ inline void SetDisplayable(bool value) { m_displayableHasBeenSet = true; m_displayable = value; } /** *

Determines whether the field is returned in the query response. The default * is true.

*/ inline Search& WithDisplayable(bool value) { SetDisplayable(value); return *this;} /** *

Determines whether the field can be used to sort the results of a query. If * you specify sorting on a field that does not have Sortable set to * true, Amazon Kendra returns an exception. The default is * false.

*/ inline bool GetSortable() const{ return m_sortable; } /** *

Determines whether the field can be used to sort the results of a query. If * you specify sorting on a field that does not have Sortable set to * true, Amazon Kendra returns an exception. The default is * false.

*/ inline bool SortableHasBeenSet() const { return m_sortableHasBeenSet; } /** *

Determines whether the field can be used to sort the results of a query. If * you specify sorting on a field that does not have Sortable set to * true, Amazon Kendra returns an exception. The default is * false.

*/ inline void SetSortable(bool value) { m_sortableHasBeenSet = true; m_sortable = value; } /** *

Determines whether the field can be used to sort the results of a query. If * you specify sorting on a field that does not have Sortable set to * true, Amazon Kendra returns an exception. The default is * false.

*/ inline Search& WithSortable(bool value) { SetSortable(value); return *this;} private: bool m_facetable; bool m_facetableHasBeenSet = false; bool m_searchable; bool m_searchableHasBeenSet = false; bool m_displayable; bool m_displayableHasBeenSet = false; bool m_sortable; bool m_sortableHasBeenSet = false; }; } // namespace Model } // namespace kendra } // namespace Aws