Class
Field
is an abstract base class representing a field of a document. This class should not be directly instantiated; instead, use one of the subclasses representing specific data types.
Field
is defined in the module
google.appengine.api.search
.
- Properties:
- Subclasses:
Properties
An instance of class
Field
has the following properties:
- name
-
Name of the field. Must begin with a letter, contain only letters, digits, and underscores (
_
), and have maximum length_MAXIMUM_FIELD_NAME_LENGTH
. - language
-
Two-letter ISO 693-1 language code for the field's content, to assist in tokenization. For example,
en
signifies that the field is English. IfNone
, the language code of the document will be used. - value
-
Value of the field. Data type varies depending on the specific subclass.
Subclasses
Class
Field
has the following subclasses:
- class TextField
-
A field containing text.
The field's value must be a string or Unicode string. The following example shows a text field named
signature
with Polish language content:TextField(name='signature', value='brzydka pogoda', language='pl')
-
Exceptions
- TypeError
-
Value supplied is not a text string.
- ValueError