str
Required. Supported textual and numerical facet keys in
Document
object, over which the facet values are computed. Facet key
is case-sensitive.
intervals
MutableSequence[google.cloud.discoveryengine_v1beta.types.Interval]
Set only if values should be bucketed into
intervals. Must be set for facets with numerical
values. Must not be set for facet with text
values. Maximum number of intervals is 30.
restricted_values
MutableSequence[str]
Only get facet for the given restricted values. Only
supported on textual fields. For example, suppose "category"
has three values "Action > 2022", "Action > 2021" and
"Sci-Fi > 2022". If set "restricted_values" to "Action >
2022", the "category" facet only contains "Action > 2022".
Only supported on textual fields. Maximum is 10.
prefixes
MutableSequence[str]
Only get facet values that start with the
given string prefix. For example, suppose
"category" has three values "Action > 2022",
"Action > 2021" and "Sci-Fi > 2022". If set
"prefixes" to "Action", the "category" facet
only contains "Action > 2022" and "Action >
2021". Only supported on textual fields. Maximum
is 10.
contains
MutableSequence[str]
Only get facet values that contain the given
strings. For example, suppose "category" has
three values "Action > 2022", "Action > 2021"
and "Sci-Fi > 2022". If set "contains" to
"2022", the "category" facet only contains
"Action > 2022" and "Sci-Fi > 2022". Only
supported on textual fields. Maximum is 10.
case_insensitive
bool
True to make facet keys case insensitive when
getting faceting values with prefixes or
contains; false otherwise.
order_by
str
The order in which documents are returned.
Allowed values are:
- "count desc", which means order by
SearchResponse.Facet.values.count
descending.
- "value desc", which means order by
SearchResponse.Facet.values.value
descending. Only applies to textual facets.
If not set, textual values are sorted in `natural
order
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Class FacetKey (0.13.11)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.11 (latest)](/python/docs/reference/discoveryengine/latest/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.13.10](/python/docs/reference/discoveryengine/0.13.10/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.12.3](/python/docs/reference/discoveryengine/0.12.3/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.11.14](/python/docs/reference/discoveryengine/0.11.14/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.10.0](/python/docs/reference/discoveryengine/0.10.0/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.9.1](/python/docs/reference/discoveryengine/0.9.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.8.1](/python/docs/reference/discoveryengine/0.8.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.7.0](/python/docs/reference/discoveryengine/0.7.0/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.6.0](/python/docs/reference/discoveryengine/0.6.0/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.5.0](/python/docs/reference/discoveryengine/0.5.0/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.4.1](/python/docs/reference/discoveryengine/0.4.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.3.1](/python/docs/reference/discoveryengine/0.3.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.2.1](/python/docs/reference/discoveryengine/0.2.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey)\n- [0.1.1](/python/docs/reference/discoveryengine/0.1.1/google.cloud.discoveryengine_v1beta.types.SearchRequest.FacetSpec.FacetKey) \n\n FacetKey(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nSpecifies how a facet is computed."]]