Skip to content

Commit

Permalink
[Enterprise Search] Add "last_access_control_sync_scheduled_at" field…
Browse files Browse the repository at this point in the history
… to connector (#158823)
  • Loading branch information
timgrein authored Jun 1, 2023
1 parent 3ac1666 commit cdecdc8
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export interface Connector {
index_name: string;
is_native: boolean;
language: string | null;
last_access_control_sync_scheduled_at: string | null;
last_access_control_sync_status: SyncStatus | null;
last_seen: string | null;
last_sync_error: string | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
index_name: 'connector',
is_native: false,
language: 'en',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: SyncStatus.COMPLETED,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -231,6 +232,7 @@ export const indices: ElasticsearchIndexWithIngestion[] = [
index_name: 'crawler',
is_native: true,
language: 'en',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: SyncStatus.COMPLETED,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const connectorIndex: ConnectorViewIndex = {
index_name: 'connector',
is_native: false,
language: 'en',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: SyncStatus.COMPLETED,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -245,6 +246,7 @@ export const crawlerIndex: CrawlerViewIndex = {
index_name: 'crawler',
is_native: true,
language: 'en',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: SyncStatus.COMPLETED,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ describe('Setup Indices', () => {
index_name: { type: 'keyword' },
is_native: { type: 'boolean' },
language: { type: 'keyword' },
last_access_control_sync_scheduled_at: { type: 'date' },
last_access_control_sync_status: { type: 'keyword' },
last_deleted_document_count: { type: 'long' },
last_incremental_sync_scheduled_at: { type: 'date' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const connectorMappingsProperties: Record<string, MappingProperty> = {
index_name: { type: 'keyword' },
is_native: { type: 'boolean' },
language: { type: 'keyword' },
last_access_control_sync_scheduled_at: { type: 'date' },
last_access_control_sync_status: { type: 'keyword' },
last_deleted_document_count: { type: 'long' },
last_incremental_sync_scheduled_at: { type: 'date' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ describe('addConnector lib function', () => {
index_name: 'index_name',
is_native: false,
language: 'fr',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -328,6 +329,7 @@ describe('addConnector lib function', () => {
index_name: 'index_name',
is_native: true,
language: null,
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -437,6 +439,7 @@ describe('addConnector lib function', () => {
index_name: 'search-index_name',
is_native: false,
language: 'en',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ describe('startSync lib function', () => {
error: null,
index_name: 'index_name',
language: null,
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('addConnector lib function', () => {
custom_scheduling: {},
error: null,
index_name: 'index_name',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -67,6 +68,7 @@ describe('addConnector lib function', () => {
custom_scheduling: {},
error: null,
index_name: 'index_name',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe('recreateConnectorDocument lib function', () => {
index_name: 'indexName',
is_native: false,
language: '',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ describe('createConnectorDocument', () => {
index_name: 'indexName',
is_native: false,
language: 'fr',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down Expand Up @@ -179,6 +180,7 @@ describe('createConnectorDocument', () => {
index_name: 'search-indexName',
is_native: false,
language: 'fr',
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export function createConnectorDocument({
index_name: indexName,
is_native: isNative,
language,
last_access_control_sync_scheduled_at: null,
last_access_control_sync_status: null,
last_seen: null,
last_sync_error: null,
Expand Down

0 comments on commit cdecdc8

Please sign in to comment.