Skip to content

Commit

Permalink
updating names
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Li <[email protected]>
  • Loading branch information
sejli committed Aug 30, 2024
1 parent 83d5dd9 commit dbc7a51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/plugins/data/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const UI_SETTINGS = {
COURIER_BATCH_SEARCHES: 'courier:batchSearches',
SEARCH_INCLUDE_FROZEN: 'search:includeFrozen',
SEARCH_TIMEOUT: 'search:timeout',
SEARCH_USE_FIELDS: 'search:useFields',
SEARCH_INCLUDE_ALL_FIELDS: 'search:includeAllFields',
HISTOGRAM_BAR_TARGET: 'histogram:barTarget',
HISTOGRAM_MAX_BARS: 'histogram:maxBars',
HISTORY_LIMIT: 'history:limit',
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/data/common/search/search_source/search_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const searchSourceRequiredUiSettings = [
UI_SETTINGS.SEARCH_INCLUDE_FROZEN,
UI_SETTINGS.SORT_OPTIONS,
UI_SETTINGS.QUERY_DATAFRAME_HYDRATION_STRATEGY,
UI_SETTINGS.SEARCH_USE_FIELDS,
UI_SETTINGS.SEARCH_INCLUDE_ALL_FIELDS,
];

export interface SearchSourceDependencies extends FetchHandlers {
Expand Down Expand Up @@ -593,7 +593,7 @@ export class SearchSource {

body.stored_fields = computedFields.storedFields;
body.script_fields = body.script_fields || {};
if (getConfig(UI_SETTINGS.SEARCH_USE_FIELDS)) {
if (getConfig(UI_SETTINGS.SEARCH_INCLUDE_ALL_FIELDS)) {
body.fields = ['*'];

Check warning on line 597 in src/plugins/data/common/search/search_source/search_source.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/data/common/search/search_source/search_source.ts#L597

Added line #L597 was not covered by tests
}
extend(body.script_fields, computedFields.scriptFields);
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/data/server/ui_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,12 +762,12 @@ export function getUiSettings(): Record<string, UiSettingsParams<unknown>> {
}),
schema: schema.arrayOf(schema.string()),
},
[UI_SETTINGS.SEARCH_USE_FIELDS]: {
name: i18n.translate('data.advancedSettings.searchUseFieldsTitle', {
[UI_SETTINGS.SEARCH_INCLUDE_ALL_FIELDS]: {
name: i18n.translate('data.advancedSettings.searchIncludeAllFieldsTitle', {
defaultMessage: 'Include all fields in search request',
}),
value: false,
description: i18n.translate('data.advancedSettings.searchUseFieldsDescription', {
description: i18n.translate('data.advancedSettings.searchIncludeAllFieldsText', {
defaultMessage: `
<strong>Experimental</strong>:
Adds the <code>"fields": ["*"]</code> property to search request body`,
Expand Down

0 comments on commit dbc7a51

Please sign in to comment.