@@ -32,77 +32,15 @@ class TransactionsClient(BaseTransactionsClient):
32
32
settings = ElasticsearchSettings ()
33
33
client = settings .create_client
34
34
35
- dynamicTemplates = [
36
- # Common https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md
37
- {
38
- "descriptions" : {
39
- "match_mapping_type" : "string" ,
40
- "match" : "description" ,
41
- "mapping" : {"type" : "text" },
42
- }
43
- },
44
- {
45
- "titles" : {
46
- "match_mapping_type" : "string" ,
47
- "match" : "title" ,
48
- "mapping" : {"type" : "text" },
49
- }
50
- },
51
- # Projection Extension https://github.com/stac-extensions/projection
52
- {"proj_epsg" : {"match" : "proj:epsg" , "mapping" : {"type" : "integer" }}},
53
- {
54
- "proj_projjson" : {
55
- "match" : "proj:projjson" ,
56
- "mapping" : {"type" : "object" , "enabled" : False },
57
- }
58
- },
59
- {
60
- "proj_centroid" : {
61
- "match_mapping_type" : "string" ,
62
- "match" : "proj:centroid" ,
63
- "mapping" : {"type" : "geo_point" },
64
- }
65
- },
66
- {
67
- "proj_geometry" : {
68
- "match_mapping_type" : "string" ,
69
- "match" : "proj:geometry" ,
70
- "mapping" : {"type" : "geo_shape" },
71
- }
72
- },
73
- {
74
- "no_index_href" : {
75
- "match" : "href" ,
76
- "mapping" : {"type" : "text" , "index" : False },
77
- }
78
- },
79
- # Default all other strings not otherwise specified to keyword
80
- {"strings" : {"match_mapping_type" : "string" , "mapping" : {"type" : "keyword" }}},
81
- {"numerics" : {"match_mapping_type" : "long" , "mapping" : {"type" : "float" }}},
82
- ]
83
-
84
35
mappings = {
85
- "numeric_detection" : False ,
86
- "dynamic_templates" : dynamicTemplates ,
87
36
"properties" : {
88
37
"geometry" : {"type" : "geo_shape" },
89
- "assets" : {"type" : "object" , "enabled" : False },
90
- "links" : {"type" : "object" , "enabled" : False },
91
- "properties" : {
92
- "type" : "object" ,
93
- "properties" : {
94
- # Common https://github.com/radiantearth/stac-spec/blob/master/item-spec/common-metadata.md
95
- "datetime" : {"type" : "date" },
96
- "start_datetime" : {"type" : "date" },
97
- "end_datetime" : {"type" : "date" },
98
- "created" : {"type" : "date" },
99
- "updated" : {"type" : "date" },
100
- # Satellite Extension https://github.com/stac-extensions/sat
101
- "sat:absolute_orbit" : {"type" : "integer" },
102
- "sat:relative_orbit" : {"type" : "integer" },
103
- },
38
+ "id" : {"type" : "text" , "fields" : {"keyword" : {"type" : "keyword" }}},
39
+ "properties__datetime" : {
40
+ "type" : "text" ,
41
+ "fields" : {"keyword" : {"type" : "keyword" }},
104
42
},
105
- },
43
+ }
106
44
}
107
45
108
46
def create_item_index (self ):
0 commit comments