View source on GitHub |
An abstract base class which represents a field of a document.
Inherits From: expected_type
google.appengine.api.search.Field(
name, value, language=None
)
This class should not be directly instantiated.
Args | |
---|---|
name
|
The name of the field. Field names must have maximum length MAXIMUM_FIELD_NAME_LENGTH and match pattern "[A-Za-z][A-Za-z0-9_]*". |
value
|
The value of the field which can be a str, unicode or date. |
language
|
The ISO 693-1 two letter code of the language used in the value. See http://www.sil.org/iso639-3/codes.asp?order=639_1&letter=%25 for a list of valid codes. Correct specification of language code will assist in correct tokenization of the field. If None is given, then the language code of the document will be used. |
Raises | |
---|---|
TypeError
|
If any of the parameters have invalid types, or an unknown attribute is passed. |
ValueError
|
If any of the parameters have invalid values. |
Attributes | |
---|---|
language
|
Returns the code of the language the content in value is written in. |
name
|
Returns the name of the field. |
value
|
Returns the value of the field. |
Methods
__eq__
__eq__(
other
)
Return self==value.
__ne__
__ne__(
other
)
Return self!=value.
Class Variables | |
---|---|
ATOM |
'ATOM'
|
DATE |
'DATE'
|
GEO_POINT |
'GEO_POINT'
|
HTML |
'HTML'
|
NUMBER |
'NUMBER'
|
TEXT |
'TEXT'
|
TOKENIZED_PREFIX |
'TOKENIZED_PREFIX'
|
UNTOKENIZED_PREFIX |
'UNTOKENIZED_PREFIX'
|
VECTOR |
'VECTOR'
|