我将elasticsearch-dsl-py 0.0.11用于ES 1.7,并且我想添加一个GeoPoint类型,如fields.py中所列:
__all__ = [
'construct_field', 'Field', 'Object', 'Nested', 'Date', 'String', 'Float', 'Double',
'Byte', 'Short', 'Integer', 'Long', 'Boolean', 'Ip', 'Attachment',
'GeoPoint', 'GeoShape', 'InnerObjectWrapper'
]但是不存在名为GeoPoint的类,并且我无法为位置字段创建映射,如下所示:
location = GeoPoint()我该怎么办?
发布于 2016-05-09 00:37:38
您需要确保像这样导入GeoPoint
from elasticsearch_dsl import GeoPoint然后,您可以将位置字段声明为
location = GeoPoint()https://stackoverflow.com/questions/37099899
复制相似问题