Skip to content

Commit

Permalink
[Search] Add extraction service RCF to native connectors (elastic#167527
Browse files Browse the repository at this point in the history
)

## Summary

Add the `use_text_extraction_service` rich configurable field to some
native connectors.
Native connectors will not have access to the feature, but the field is
required in case the user converts their native connector to a
self-managed connector.
  • Loading branch information
navarone-feekery authored Sep 29, 2023
1 parent 343c04c commit 8353a7e
Showing 1 changed file with 93 additions and 14 deletions.
107 changes: 93 additions & 14 deletions packages/kbn-search-connectors/types/native_connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ const MAX_CONCURRENT_DOWNLOADS_LABEL = i18n.translate(
}
);

const USE_TEXT_EXTRACTION_SERVICE_LABEL = i18n.translate(
'searchConnectors.nativeConnectors.textExtractionService.label',
{
defaultMessage: 'Use text extraction service',
}
);

const USE_TEXT_EXTRACTION_SERVICE_TOOLTIP = i18n.translate(
'searchConnectors.nativeConnectors.textExtractionService.tooltip',
{
defaultMessage:
'Requires a separate deployment of the Elastic Data Extraction Service. ' +
'Also requires that pipeline settings disable text extraction.',
}
);

const DATABASE_LABEL = i18n.translate('searchConnectors.nativeConnectors.databaseLabel', {
defaultMessage: 'Database',
});
Expand Down Expand Up @@ -157,6 +173,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
],
value: 100,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 6,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.SYNC_RULES]: {
Expand Down Expand Up @@ -398,6 +429,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
],
value: 50,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 12,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.SYNC_RULES]: {
Expand Down Expand Up @@ -503,6 +549,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: 100,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 7,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.SYNC_RULES]: {
Expand Down Expand Up @@ -741,6 +802,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
],
value: 100,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 12,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.SYNC_RULES]: {
Expand Down Expand Up @@ -1655,6 +1731,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
validations: [],
value: 10,
},
use_text_extraction_service: {
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 7,
required: true,
sensitive: false,
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
value: false,
},
},
features: {
[FeatureName.SYNC_RULES]: {
Expand Down Expand Up @@ -1780,24 +1871,12 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record<string, NativeConnector | unde
default_value: false,
depends_on: [],
display: DisplayType.TOGGLE,
label: i18n.translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.textExtractionServiceLabel',
{
defaultMessage: 'Use text extraction service',
}
),
label: USE_TEXT_EXTRACTION_SERVICE_LABEL,
options: [],
order: 6,
required: true,
sensitive: false,
tooltip: i18n.translate(
'searchConnectors.nativeConnectors.sharepoint_online.configuration.textExtractionServiceTooltip',
{
defaultMessage:
'Requires a separate deployment of the Elastic Data Extraction Service. ' +
'Also requires that pipeline settings disable text extraction.',
}
),
tooltip: USE_TEXT_EXTRACTION_SERVICE_TOOLTIP,
type: FieldType.BOOLEAN,
ui_restrictions: ['advanced'],
validations: [],
Expand Down

0 comments on commit 8353a7e

Please sign in to comment.