Skip to content

Commit

Permalink
Fix issue with keywords and stale data. (#429)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsthorat authored Jul 7, 2023
1 parent 7187a90 commit e587514
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
petals,
serializePath,
type LilacField,
type LilacSchema,
type LilacValueNode,
type LilacValueNodeCasted,
type Signal
Expand All @@ -43,7 +42,8 @@
const datasetViewStore = getDatasetViewContext();
const datasetStore = getDatasetContext();
$: schema = $datasetStore.selectRowsSchema?.data?.data_schema as LilacSchema | undefined;
$: schema = $datasetStore.selectRowsSchema?.data?.schema;
// Get the embeddings.
const embeddings = queryEmbeddings();
Expand Down
16 changes: 9 additions & 7 deletions web/blueprint/src/lib/components/datasetView/spanHighlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,15 @@ export function getRenderSpans(
isKeywordSpan = true;
const field = getField(schema, deserializePath(keywordSpanPath).slice(0, -1));
const signal = field?.signal as SubstringSignal;
hoverInfo.push({
name: 'keyword',
value: signal.query,
spanPath: keywordSpanPath,
isKeywordSearch: true
});
isShownSnippet = true;
if (signal?.signal_name === 'substring_search') {
hoverInfo.push({
name: 'keyword',
value: signal.query,
spanPath: keywordSpanPath,
isKeywordSearch: true
});
isShownSnippet = true;
}
}
}
}
Expand Down

0 comments on commit e587514

Please sign in to comment.