Skip to content

Facet

Source code in docs_src/capo_kendra/types/facet.py
class Facet(TypedDict, closed=True):
    document_attribute_key: NotRequired[
        "capo_kendra.types.document_attribute_key.DocumentAttributeKey"
    ]
    """<p>The unique key for the document attribute.</p>"""
    facets: NotRequired["capo_kendra.types.facet_list.FacetList"]
    """<p>An array of document attributes that are nested facets within a facet.</p> <p>For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. This helps your users further narrow their search.</p> <p>You can only have one nested facet within a facet. If you want to increase this limit, contact <a href="http://aws.amazon.com/contact-us/">Support</a>.</p>"""
    max_results: "capo_kendra.types.top_document_attribute_value_count_pairs_size.TopDocumentAttributeValueCountPairsSize"
    """<p>Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact <a href="http://aws.amazon.com/contact-us/">Support</a>.</p>"""

document_attribute_key instance-attribute

document_attribute_key: NotRequired[DocumentAttributeKey]

The unique key for the document attribute.

facets instance-attribute

facets: NotRequired[FacetList]

An array of document attributes that are nested facets within a facet.

For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned to "Engineering". You can display nested facets in the search results so that documents can be searched not only by department but also by a sub department within a department. This helps your users further narrow their search.

You can only have one nested facet within a facet. If you want to increase this limit, contact Support.

max_results instance-attribute

Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values to less than 10. If you want to increase the default, contact Support.