Skip to content

Commit c0aa52a

Browse files
Add support for the point and shape fields (#1959)
* Add support for the point field * add shape field, remove unnecessary point examples --------- Co-authored-by: Miguel Grinberg <[email protected]>
1 parent 5d2bccd commit c0aa52a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: elasticsearch_dsl/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
Nested,
6868
Object,
6969
Percolator,
70+
Point,
7071
RangeField,
7172
RankFeature,
7273
RankFeatures,
@@ -169,6 +170,7 @@
169170
"NestedFacet",
170171
"Object",
171172
"Percolator",
173+
"Point",
172174
"Q",
173175
"Query",
174176
"Range",

Diff for: elasticsearch_dsl/field.py

+8
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,14 @@ def _serialize(self, data: Any) -> Optional[str]:
486486
return base64.b64encode(data).decode()
487487

488488

489+
class Point(Field):
490+
name = "point"
491+
492+
493+
class Shape(Field):
494+
name = "shape"
495+
496+
489497
class GeoPoint(Field):
490498
name = "geo_point"
491499

0 commit comments

Comments
 (0)