Skip to content

Commit d307999

Browse files
committed
Add mapping for OpenSearch timestamp field
1 parent c0c9c41 commit d307999

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

services/pkg/dcs/opensearch.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,15 @@ func (s *opensearchIndexer) initOpenSearchIndex(name string) error {
129129
createIndexReq := opensearchapi.IndicesCreateRequest{
130130
Index: shardableName,
131131
Body: strings.NewReader(`{
132-
"settings": {}
132+
"settings": {},
133+
"mappings": {
134+
"properties": {
135+
"timestamp": {
136+
"type": "date",
137+
"format": "epoch_millis"
138+
}
139+
}
140+
}
133141
}`),
134142
}
135143

0 commit comments

Comments
 (0)