import { OsdFieldType } from './osd_field_type' ; import { OPENSEARCH_FIELD_TYPES , OSD_FIELD_TYPES } from './types' ; export const OsdFieldTypeUnknown = new OsdFieldType ( { name : OSD_FIELD_TYPES . UNKNOWN , } ) ; export const createOsdFieldTypes = ( ) : OsdFieldType [ ] => [ new OsdFieldType ( { name : OSD_FIELD_TYPES . STRING , sortable : true , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . STRING , OPENSEARCH_FIELD_TYPES . TEXT , OPENSEARCH_FIELD_TYPES . KEYWORD , OPENSEARCH_FIELD_TYPES . _TYPE , OPENSEARCH_FIELD_TYPES . _ID , ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . NUMBER , sortable : true , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . FLOAT , OPENSEARCH_FIELD_TYPES . HALF_FLOAT , OPENSEARCH_FIELD_TYPES . SCALED_FLOAT , OPENSEARCH_FIELD_TYPES . DOUBLE , OPENSEARCH_FIELD_TYPES . INTEGER , OPENSEARCH_FIELD_TYPES . LONG , OPENSEARCH_FIELD_TYPES . UNSIGNED_LONG , OPENSEARCH_FIELD_TYPES . SHORT , OPENSEARCH_FIELD_TYPES . BYTE , OPENSEARCH_FIELD_TYPES . TOKEN_COUNT , ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . DATE , sortable : true , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . DATE , OPENSEARCH_FIELD_TYPES . DATE_NANOS ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . IP , sortable : true , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . IP ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . BOOLEAN , sortable : true , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . BOOLEAN ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . OBJECT , esTypes : [ OPENSEARCH_FIELD_TYPES . OBJECT ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . NESTED , esTypes : [ OPENSEARCH_FIELD_TYPES . NESTED ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . GEO_POINT , esTypes : [ OPENSEARCH_FIELD_TYPES . GEO_POINT ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . GEO_SHAPE , esTypes : [ OPENSEARCH_FIELD_TYPES . GEO_SHAPE ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . ATTACHMENT , esTypes : [ OPENSEARCH_FIELD_TYPES . ATTACHMENT ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . MURMUR3 , esTypes : [ OPENSEARCH_FIELD_TYPES . MURMUR3 ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . _SOURCE , esTypes : [ OPENSEARCH_FIELD_TYPES . _SOURCE ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . HISTOGRAM , filterable : true , esTypes : [ OPENSEARCH_FIELD_TYPES . HISTOGRAM ] , } ) , new OsdFieldType ( { name : OSD_FIELD_TYPES . CONFLICT , } ) , OsdFieldTypeUnknown , ] ;