-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mappings Editor] Add support for synthetic _source
- Loading branch information
1 parent
aa4f430
commit 96ec5ac
Showing
12 changed files
with
244 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...omponents/mappings_editor/components/configuration_form/source_field_section/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const STORED_SOURCE_OPTION = 'stored'; | ||
export const DISABLED_SOURCE_OPTION = 'disabled'; | ||
export const SYNTHETIC_SOURCE_OPTION = 'synthetic'; |
51 changes: 51 additions & 0 deletions
51
...mponents/mappings_editor/components/configuration_form/source_field_section/i18n_texts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { STORED_SOURCE_OPTION, DISABLED_SOURCE_OPTION, SYNTHETIC_SOURCE_OPTION} from './constants'; | ||
|
||
export const sourceOptionLabels = { | ||
[STORED_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.storedSourceFieldsLabel', | ||
{ | ||
defaultMessage: 'Stored _source', | ||
} | ||
), | ||
[DISABLED_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.disabledSourceFieldsLabel', | ||
{ | ||
defaultMessage: 'Disabled _source', | ||
} | ||
), | ||
[SYNTHETIC_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.syntheticSourceFieldsLabel', | ||
{ | ||
defaultMessage: 'Synthetic _source', | ||
} | ||
), | ||
}; | ||
|
||
export const sourceOptionDescriptions = { | ||
[STORED_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.storedSourceFieldsDescription', | ||
{ | ||
defaultMessage: 'Stores content in _source field for future retrieval', | ||
} | ||
), | ||
[DISABLED_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.disabledSourceFieldsDescription', | ||
{ | ||
defaultMessage: 'Reconstructs source content to save on disk usage', | ||
} | ||
), | ||
[SYNTHETIC_SOURCE_OPTION]: i18n.translate( | ||
'xpack.idxMgmt.mappingsEditor.configuration.syntheticSourceFieldsDescription', | ||
{ | ||
defaultMessage: 'Strongly discouraged, will impact downstream functionality', | ||
} | ||
), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*/ | ||
|
||
export { SourceFieldSection } from './source_field_section'; | ||
export * from './constants'; |
Oops, something went wrong.