Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] Support unsigned_long fields (#81115) #81137

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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)
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 @@ -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)
Expand Down