Disable indexing of unnecessary Saved Object fields (#70409) (#72409)

* Disable indexing of unnecessary SO fields

* Add doc_values

* Add no doc_values to discover saved object

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Tim Roes 2020-07-20 15:00:11 +02:00 committed by GitHub
parent 17f0c78b6e
commit 5cb778c682
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 19 deletions

View file

@ -44,21 +44,23 @@ export const dashboardSavedObjectType: SavedObjectsType = {
mappings: {
properties: {
description: { type: 'text' },
hits: { type: 'integer' },
kibanaSavedObjectMeta: { properties: { searchSourceJSON: { type: 'text' } } },
optionsJSON: { type: 'text' },
panelsJSON: { type: 'text' },
hits: { type: 'integer', index: false, doc_values: false },
kibanaSavedObjectMeta: {
properties: { searchSourceJSON: { type: 'text', index: false, doc_values: false } },
},
optionsJSON: { type: 'text', index: false, doc_values: false },
panelsJSON: { type: 'text', index: false, doc_values: false },
refreshInterval: {
properties: {
display: { type: 'keyword' },
pause: { type: 'boolean' },
section: { type: 'integer' },
value: { type: 'integer' },
display: { type: 'keyword', index: false, doc_values: false },
pause: { type: 'boolean', index: false, doc_values: false },
section: { type: 'integer', index: false, doc_values: false },
value: { type: 'integer', index: false, doc_values: false },
},
},
timeFrom: { type: 'keyword' },
timeRestore: { type: 'boolean' },
timeTo: { type: 'keyword' },
timeFrom: { type: 'keyword', index: false, doc_values: false },
timeRestore: { type: 'boolean', index: false, doc_values: false },
timeTo: { type: 'keyword', index: false, doc_values: false },
title: { type: 'text' },
version: { type: 'integer' },
},

View file

@ -43,15 +43,15 @@ export const searchSavedObjectType: SavedObjectsType = {
},
mappings: {
properties: {
columns: { type: 'keyword', index: false },
columns: { type: 'keyword', index: false, doc_values: false },
description: { type: 'text' },
hits: { type: 'integer', index: false },
hits: { type: 'integer', index: false, doc_values: false },
kibanaSavedObjectMeta: {
properties: {
searchSourceJSON: { type: 'text', index: false },
searchSourceJSON: { type: 'text', index: false, doc_values: false },
},
},
sort: { type: 'keyword', index: false },
sort: { type: 'keyword', index: false, doc_values: false },
title: { type: 'text' },
version: { type: 'integer' },
},

View file

@ -44,12 +44,14 @@ export const visualizationSavedObjectType: SavedObjectsType = {
mappings: {
properties: {
description: { type: 'text' },
kibanaSavedObjectMeta: { properties: { searchSourceJSON: { type: 'text' } } },
savedSearchRefName: { type: 'keyword' },
kibanaSavedObjectMeta: {
properties: { searchSourceJSON: { type: 'text', index: false, doc_values: false } },
},
savedSearchRefName: { type: 'keyword', index: false, doc_values: false },
title: { type: 'text' },
uiStateJSON: { type: 'text' },
uiStateJSON: { type: 'text', index: false, doc_values: false },
version: { type: 'integer' },
visState: { type: 'text' },
visState: { type: 'text', index: false, doc_values: false },
},
},
migrations: visualizationSavedObjectTypeMigrations,

View file

@ -40,6 +40,7 @@ export function setupSavedObjects(core: CoreSetup) {
},
expression: {
index: false,
doc_values: false,
type: 'keyword',
},
},