Python 2.7 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their deprecation date
. We recommend that
you migrate to the latest supported version of Python
.
The FacetOptions Class
Stay organized with collections
Save and categorize content based on your preferences.
Class FacetOptions
provides options for processing facet results of a query.
FacetOptions
is defined in the google.appengine.api.search
module.
Introduction
Class FacetOptions
provides options for processing facet results of a
query. Options include number of facets to discover, number of values for each facet and the depth
of the result to be considered for facet computation.
Constructor
The constructor for class FacetOptions
is defined as follows:
-
facet_option = FacetOptions(discovery_limit=5, discovery_value_limit=None, depth=None)
-
Specify options for processing facet results of a query.
-
Arguments
- discovery_limit
- discovery_value_limit
- depth
Result value
-
A new instance of class FacetOptions
.
Exceptions
- TypeError
-
If an unknown attribute is passed.
- ValueError
-
If any of the parameters have invalid values (e.g., a negative depth).
Properties
An instance of class FacetOptions
has the following properties:
- discovery_limit
-
Number of facets to discover if facet discovery is
turned on. If None, discover facets will be disabled.
- discovery_value_limit
-
Number of values to be discovered for each of
the top discovered facets.
- depth
-
Number of documents in query results to evaluate to gather
facet information.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-29 UTC.
[[["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-29 UTC."],[[["\u003cp\u003e\u003ccode\u003eFacetOptions\u003c/code\u003e class is used to configure the processing of facet results from a query.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows you to specify the number of facets, values per facet, and the depth of results to include.\u003c/p\u003e\n"],["\u003cp\u003eThis API is applicable to first-generation runtimes and offers options for upgrading to second-generation runtimes, with a migration guide available for Python 3 runtime.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFacetOptions\u003c/code\u003e is located in the \u003ccode\u003egoogle.appengine.api.search\u003c/code\u003e module.\u003c/p\u003e\n"]]],[],null,["# The FacetOptions Class\n\nClass `FacetOptions` provides options for processing facet results of a query.\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| python3\n|\n| /services/access). If you are updating to the App Engine Python 3 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/python-differences) to learn about your migration options for legacy bundled services.\n\n`FacetOptions` is defined in the `google.appengine.api.search` module.\n\nIntroduction\n------------\n\nClass `FacetOptions` provides options for processing facet results of a\nquery. Options include number of facets to discover, number of values for each facet and the depth\nof the result to be considered for facet computation.\n\nConstructor\n-----------"]]