refactor(retrieval-method): replace all instances of invertedIndex with keyword_search in components and translations

This commit is contained in:
twwu 2025-08-21 17:31:25 +08:00
parent 5699adf69c
commit d3b6631df8
7 changed files with 9 additions and 11 deletions

View File

@ -28,8 +28,8 @@ const EconomicalRetrievalMethodConfig: FC<Props> = ({
disabled={disabled}
icon={<VectorSearch className='size-4' />}
iconActiveColor='text-util-colors-purple-purple-600'
title={t('dataset.retrieval.invertedIndex.title')}
description={t('dataset.retrieval.invertedIndex.description')}
title={t('dataset.retrieval.keyword_search.title')}
description={t('dataset.retrieval.keyword_search.description')}
isActive
effectColor={EffectColor.purple}
showEffectColor

View File

@ -102,7 +102,6 @@ const RuleDetail: FC<{
break
}
return value
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [sourceData])
return <div className='flex flex-col gap-1'>
@ -131,7 +130,7 @@ const RuleDetail: FC<{
<FieldInfo
label={t('datasetSettings.form.retrievalSetting.title')}
// displayedValue={t(`datasetSettings.form.retrievalSetting.${retrievalMethod}`) as string}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'invertedIndex' : retrievalMethod}.title`) as string}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'keyword_search' : retrievalMethod}.title`) as string}
valueIcon={
<Image
className='size-4'
@ -197,7 +196,6 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
return () => {
stopQueryStatus()
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
// get rule

View File

@ -105,7 +105,7 @@ const RuleDetail = ({
/>
<FieldInfo
label={t('datasetSettings.form.retrievalSetting.title')}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'invertedIndex' : retrievalMethod}.title`) as string}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'keyword_search' : retrievalMethod}.title`) as string}
valueIcon={
<Image
className='size-4'

View File

@ -131,7 +131,7 @@ const RuleDetail: FC<IRuleDetailProps> = React.memo(({
/>
<FieldInfo
label={t('datasetSettings.form.retrievalSetting.title')}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'invertedIndex' : retrievalMethod}.title`) as string}
displayedValue={t(`dataset.retrieval.${indexingType === IndexingType.ECONOMICAL ? 'keyword_search' : retrievalMethod}.title`) as string}
valueIcon={
<Image
className='size-4'

View File

@ -48,8 +48,8 @@ export const useRetrievalSetting = (indexMethod?: IndexMethodEnum) => {
return {
id: RetrievalSearchMethodEnum.keywordSearch,
icon: HybridSearch as any,
title: t('dataset.retrieval.invertedIndex.title'),
description: t('dataset.retrieval.invertedIndex.description'),
title: t('dataset.retrieval.keyword_search.title'),
description: t('dataset.retrieval.keyword_search.description'),
effectColor: 'purple',
}
}, [t])

View File

@ -126,7 +126,7 @@ const translation = {
description: 'Execute full-text search and vector searches simultaneously, re-rank to select the best match for the user\'s query. Users can choose to set weights or configure to a Rerank model.',
recommend: 'Recommend',
},
invertedIndex: {
keyword_search: {
title: 'Inverted Index',
description: 'Inverted Index is a structure used for efficient retrieval. Organized by terms, each term points to documents or web pages containing it.',
},

View File

@ -126,7 +126,7 @@ const translation = {
description: '同时执行全文检索和向量检索,并应用重排序步骤,从两类查询结果中选择匹配用户问题的最佳结果,用户可以选择设置权重或配置重新排序模型。',
recommend: '推荐',
},
invertedIndex: {
keyword_search: {
title: '倒排索引',
description: '倒排索引是一种用于高效检索的结构。按术语组织,每个术语指向包含它的文档或网页',
},