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

Facet Classes

Class Facet is an abstract base class representing a facet of a document. This class should not be directly instantiated.

Facet is defined in the module


An instance of class Facet has the following properties:


The name of the facet. Facet names must have maximum length MAXIMUM_FIELD_NAME_LENGTH and match pattern "[A-Za-z][A-Za- z0-9_]*".


The value of the facet which can be a str, unicode or number.


Class Facet has the following subclasses:

class AtomFacet

A Facet that has content to be treated as a single token for indexing.

The facet's value is a str or unicode object to be treated as an indivisible text value. The following example shows an atom facet named wine_type:

AtomFacet(name='wine_type', value='Red')



Value supplied is not a text string.


Value exceeds maximum allowable length.

class NumberFacet

A Facet that has a numeric value.

The following example shows a number facet named wine_vintage:

NumberFacet(name='wine_vintage', value=2000)



Value supplied is not numeric.


Value is out of range.

هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

App Engine standard environment for Python 2