View source on GitHub |
A vector field that can be used in a dot product expression.
Inherits From: Field
, expected_type
google.appengine.api.search.VectorField(
name, value=None
)
The following example shows a vector field named scores: VectorField(name='scores', value=[1, 2, 3]) That can be used in a sort/field expression like this: dot(scores, vector(3, 2, 1))
Args | |
---|---|
name
|
The name of the field. |
value
|
The vector field value. |
Raises | |
---|---|
TypeError
|
If vector elements are not numbers. |
ValueError
|
If value elements are not finite numbers. |
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'
|