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 google.appengine.api.search.

Properties

An instance of class Facet has the following properties:

name

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_]*".

value

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

Subclasses

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')

Exceptions

TypeError

Value supplied is not a text string.

ValueError

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)

Exceptions

TypeError

Value supplied is not numeric.

ValueError

Value is out of range.