Support unsigned_long fields (#81115)

* Support unsigned_long fields

* Change API docs
This commit is contained in:
Tim Roes 2020-10-20 13:58:48 +02:00 committed by GitHub
parent 702e0c7d73
commit 3a206ab198
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 2 deletions

View file

@ -43,4 +43,5 @@ export declare enum ES_FIELD_TYPES
| STRING | <code>&quot;string&quot;</code> | |
| TEXT | <code>&quot;text&quot;</code> | |
| TOKEN\_COUNT | <code>&quot;token_count&quot;</code> | |
| UNSIGNED\_LONG | <code>&quot;unsigned_long&quot;</code> | |

View file

@ -43,4 +43,5 @@ export declare enum ES_FIELD_TYPES
| STRING | <code>&quot;string&quot;</code> | |
| TEXT | <code>&quot;text&quot;</code> | |
| TOKEN\_COUNT | <code>&quot;token_count&quot;</code> | |
| UNSIGNED\_LONG | <code>&quot;unsigned_long&quot;</code> | |

View file

@ -66,6 +66,7 @@ describe('utils/kbn_field_types', () => {
test('returns the kbnFieldType name that matches the esType', () => {
expect(castEsToKbnFieldTypeName(ES_FIELD_TYPES.KEYWORD)).toBe('string');
expect(castEsToKbnFieldTypeName(ES_FIELD_TYPES.FLOAT)).toBe('number');
expect(castEsToKbnFieldTypeName(ES_FIELD_TYPES.UNSIGNED_LONG)).toBe('number');
});
test('returns unknown for unknown es types', () => {

View file

@ -48,6 +48,7 @@ export const createKbnFieldTypes = (): KbnFieldType[] => [
ES_FIELD_TYPES.DOUBLE,
ES_FIELD_TYPES.INTEGER,
ES_FIELD_TYPES.LONG,
ES_FIELD_TYPES.UNSIGNED_LONG,
ES_FIELD_TYPES.SHORT,
ES_FIELD_TYPES.BYTE,
ES_FIELD_TYPES.TOKEN_COUNT,

View file

@ -52,6 +52,7 @@ export enum ES_FIELD_TYPES {
INTEGER = 'integer',
LONG = 'long',
SHORT = 'short',
UNSIGNED_LONG = 'unsigned_long',
NESTED = 'nested',
BYTE = 'byte',

View file

@ -514,7 +514,9 @@ export enum ES_FIELD_TYPES {
// (undocumented)
TOKEN_COUNT = "token_count",
// (undocumented)
_TYPE = "_type"
_TYPE = "_type",
// (undocumented)
UNSIGNED_LONG = "unsigned_long"
}
// Warning: (ae-missing-release-tag) "ES_SEARCH_STRATEGY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)

View file

@ -211,7 +211,9 @@ export enum ES_FIELD_TYPES {
// (undocumented)
TOKEN_COUNT = "token_count",
// (undocumented)
_TYPE = "_type"
_TYPE = "_type",
// (undocumented)
UNSIGNED_LONG = "unsigned_long"
}
// Warning: (ae-missing-release-tag) "ES_SEARCH_STRATEGY" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)