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.

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

The FacetResultValue Class

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

Class FacetResultValue Represents a facet value as part of search result.

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.

FacetResultValue is defined in the module


The constructor for class FacetResultValue is defined as follows:

class FacetResultValue(label, count, refinement)

Construct an instance of class FacetRefinement.


Sets the label property
Sets the count property
Sets the refinement property

Result value

A new instance of class FacetResultValue.



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


If any of the parameters have invalid values.


An instance of class FacetResultValue has the following properties:


The label for this facet value. For an atom facet, the label is the facet's string value, For numeric facet values, it's a string representing the value range.


The number of documents (in the current query results) that match this FacetResultValue.


The FacetRefinement object for this FacetResultValue. Passing this object or its string token to the next query will refine the result based on this facet value.