Skip to content

Commit

Permalink
Support unsigned_long fields (elastic#81115)
Browse files Browse the repository at this point in the history
* Support unsigned_long fields

* Change API docs
  • Loading branch information
Tim Roes authored and timroes committed Oct 20, 2020
1 parent ac7b6c0 commit f39ce7e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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> | |

Original file line number Diff line number Diff line change
Expand Up @@ -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> | |

Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/plugins/data/common/kbn_field_types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export enum ES_FIELD_TYPES {
INTEGER = 'integer',
LONG = 'long',
SHORT = 'short',
UNSIGNED_LONG = 'unsigned_long',

NESTED = 'nested',
BYTE = 'byte',
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,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)
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/data/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,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)
Expand Down

0 comments on commit f39ce7e

Please sign in to comment.