Skip to content

Commit

Permalink
Slack connector parents field update during sync
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet committed Sep 6, 2023
1 parent af02ecb commit c8bbaa7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions connectors/src/connectors/slack/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export async function syncNonThreaded(
documentUrl: sourceUrl,
timestampMs: createdAt,
tags,
parents: [],
parents: [channelId],
upsertContext: {
sync_type: isBatchSync ? "batch" : "incremental",
},
Expand Down Expand Up @@ -559,7 +559,7 @@ export async function syncThread(
documentUrl: sourceUrl,
timestampMs: createdAt,
tags,
parents: [],
parents: [channelId],
upsertContext: {
sync_type: isBatchSync ? "batch" : "incremental",
},
Expand Down
8 changes: 5 additions & 3 deletions core/src/data_sources/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ pub struct Chunk {
/// if the document’s id is selected as a parent filter, the document itself
/// shows up in the search.
///
///
/// Note however that the hierarchical system depends on the managed datasource.
/// For example, in the Slack managed datasource, documents only have a single
/// parent in the array, their channel (since a channel does not have any
/// parent).
/// For example, in the Slack managed datasource, documents are aggregated
/// messages from a channel. A channel does not have any parent, and there are
/// no slack ids for our slack "documents" so the only value in the parents
/// array is the slack channel id
///
/// Parents are at the time of writing only relevant for managed datasources
/// since standard datasources do not allow specifying a hierarchy. A parent is
Expand Down

0 comments on commit c8bbaa7

Please sign in to comment.