mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
feat: add support for date mapping
This commit is contained in:
@@ -39,6 +39,9 @@ export const premaps: ElasticsearchPremap = {
|
|||||||
tree: 'quadtree',
|
tree: 'quadtree',
|
||||||
type: ElasticsearchDataType.geo_shape,
|
type: ElasticsearchDataType.geo_shape,
|
||||||
},
|
},
|
||||||
|
SCISO8601DateRange: {
|
||||||
|
type: ElasticsearchDataType.date_range,
|
||||||
|
},
|
||||||
'jsonpatch.OpPatch': {
|
'jsonpatch.OpPatch': {
|
||||||
dynamic: 'strict',
|
dynamic: 'strict',
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ export enum ElasticsearchDataType {
|
|||||||
geo_point = 'geo_point',
|
geo_point = 'geo_point',
|
||||||
geo_shape = 'geo_shape',
|
geo_shape = 'geo_shape',
|
||||||
completion = 'completion',
|
completion = 'completion',
|
||||||
|
date_range = 'date_rage',
|
||||||
|
// integer_range = 'integer_range',
|
||||||
|
// float_range = 'float_range',
|
||||||
|
// long_range = 'long_range',
|
||||||
|
// double_range = 'double_range',
|
||||||
|
// ip_range = 'ip_range',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const typemap: ElasticsearchTypemap = {
|
export const typemap: ElasticsearchTypemap = {
|
||||||
@@ -45,11 +51,13 @@ export const typemap: ElasticsearchTypemap = {
|
|||||||
default: ElasticsearchDataType.integer,
|
default: ElasticsearchDataType.integer,
|
||||||
float: ElasticsearchDataType.float,
|
float: ElasticsearchDataType.float,
|
||||||
integer: ElasticsearchDataType.integer,
|
integer: ElasticsearchDataType.integer,
|
||||||
|
date: ElasticsearchDataType.date,
|
||||||
},
|
},
|
||||||
string: {
|
string: {
|
||||||
default: ElasticsearchDataType.text,
|
default: ElasticsearchDataType.text,
|
||||||
keyword: ElasticsearchDataType.keyword,
|
keyword: ElasticsearchDataType.keyword,
|
||||||
text: ElasticsearchDataType.text,
|
text: ElasticsearchDataType.text,
|
||||||
|
date: ElasticsearchDataType.date,
|
||||||
},
|
},
|
||||||
stringLiteral: {
|
stringLiteral: {
|
||||||
default: ElasticsearchDataType.keyword,
|
default: ElasticsearchDataType.keyword,
|
||||||
|
|||||||
@@ -42,6 +42,16 @@ export interface MapExplicitTypes {
|
|||||||
*/
|
*/
|
||||||
esText: string;
|
esText: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @date
|
||||||
|
*/
|
||||||
|
esEpochMsDate: number
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @date
|
||||||
|
*/
|
||||||
|
esStringDate: string
|
||||||
|
|
||||||
type: ThingType.MapExplicitTypes;
|
type: ThingType.MapExplicitTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +70,13 @@ export const mapExplicitTypesTest: MapAggTestOptions = {
|
|||||||
},
|
},
|
||||||
esText: {
|
esText: {
|
||||||
type: ElasticsearchDataType.text
|
type: ElasticsearchDataType.text
|
||||||
}
|
},
|
||||||
|
esEpochMsDate: {
|
||||||
|
type: ElasticsearchDataType.date
|
||||||
|
},
|
||||||
|
esStringDate: {
|
||||||
|
type: ElasticsearchDataType.date
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user