Skip to content

Commit 9011e0c

Browse files
github-actions[bot]Telomerazmiguelgrinberg
authored
[Backport 8.x] Add support for the point field (#1963)
* 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]> (cherry picked from commit c0aa52a) * Add shape declaration (#1962) * Add support for the point field * add shape field, remove unnecessary point examples * add missing Shape declaration --------- Co-authored-by: Hüseyin Emre Armağan <[email protected]> --------- Co-authored-by: Hüseyin Emre Armağan <[email protected]> Co-authored-by: Miguel Grinberg <[email protected]>
1 parent 185268e commit 9011e0c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: elasticsearch_dsl/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@
6767
Nested,
6868
Object,
6969
Percolator,
70+
Point,
7071
RangeField,
7172
RankFeature,
7273
RankFeatures,
7374
ScaledFloat,
7475
SearchAsYouType,
76+
Shape,
7577
Short,
7678
SparseVector,
7779
Text,
@@ -169,6 +171,7 @@
169171
"NestedFacet",
170172
"Object",
171173
"Percolator",
174+
"Point",
172175
"Q",
173176
"Query",
174177
"Range",
@@ -181,6 +184,7 @@
181184
"ScaledFloat",
182185
"Search",
183186
"SearchAsYouType",
187+
"Shape",
184188
"Short",
185189
"SparseVector",
186190
"TermsFacet",

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)