Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3.

The FacetResult Class

Stay organized with collections Save and categorize content based on your preferences.

Class FacetResult Represents a facet result returned from a search with faceted search.

Caution: **This solution is no longer recommended:** Apps that use this API can only run in the Python 2 runtime and will need to upgrade to a [recommended solution](/appengine/docs/legacy/standard/python/migrate-to-python3/migrating-services#migration_paths_for_bundled_services) before migrating to the Python 3 runtime.

FacetResult is defined in the module google.appengine.api.search.

Constructor

The constructor for class FacetResult is defined as follows:

class FacetResult(name, values=None)

Construct an instance of class FacetRefinement.

Arguments

name
Sets the name property
values
Sets the values property

Result value

A new instance of class FacetResult.

Exceptions

TypeError

If any of the parameters have invalid types, or an unknown attribute is passed.

ValueError

If any of the parameters have invalid values.

Properties

An instance of class FacetResult has the following properties:

name

The name of this facet result.

values

The values for this facet result.