mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 20:48:01 +08:00
refactor(retrieval-method): replace all instances of invertedIndex with keyword_search in components and translations
This commit is contained in:
parent
5699adf69c
commit
d3b6631df8
@ -28,8 +28,8 @@ const EconomicalRetrievalMethodConfig: FC<Props> = ({
|
|||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
icon={<VectorSearch className='size-4' />}
|
icon={<VectorSearch className='size-4' />}
|
||||||
iconActiveColor='text-util-colors-purple-purple-600'
|
iconActiveColor='text-util-colors-purple-purple-600'
|
||||||
title={t('dataset.retrieval.invertedIndex.title')}
|
title={t('dataset.retrieval.keyword_search.title')}
|
||||||
description={t('dataset.retrieval.invertedIndex.description')}
|
description={t('dataset.retrieval.keyword_search.description')}
|
||||||
isActive
|
isActive
|
||||||
effectColor={EffectColor.purple}
|
effectColor={EffectColor.purple}
|
||||||
showEffectColor
|
showEffectColor
|
||||||
|
|||||||
@ -102,7 +102,6 @@ const RuleDetail: FC<{
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [sourceData])
|
}, [sourceData])
|
||||||
|
|
||||||
return <div className='flex flex-col gap-1'>
|
return <div className='flex flex-col gap-1'>
|
||||||
@ -131,7 +130,7 @@ const RuleDetail: FC<{
|
|||||||
<FieldInfo
|
<FieldInfo
|
||||||
label={t('datasetSettings.form.retrievalSetting.title')}
|
label={t('datasetSettings.form.retrievalSetting.title')}
|
||||||
// displayedValue={t(`datasetSettings.form.retrievalSetting.${retrievalMethod}`) as string}
|
// 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={
|
valueIcon={
|
||||||
<Image
|
<Image
|
||||||
className='size-4'
|
className='size-4'
|
||||||
@ -197,7 +196,6 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
|
|||||||
return () => {
|
return () => {
|
||||||
stopQueryStatus()
|
stopQueryStatus()
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
// get rule
|
// get rule
|
||||||
|
|||||||
@ -105,7 +105,7 @@ const RuleDetail = ({
|
|||||||
/>
|
/>
|
||||||
<FieldInfo
|
<FieldInfo
|
||||||
label={t('datasetSettings.form.retrievalSetting.title')}
|
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={
|
valueIcon={
|
||||||
<Image
|
<Image
|
||||||
className='size-4'
|
className='size-4'
|
||||||
|
|||||||
@ -131,7 +131,7 @@ const RuleDetail: FC<IRuleDetailProps> = React.memo(({
|
|||||||
/>
|
/>
|
||||||
<FieldInfo
|
<FieldInfo
|
||||||
label={t('datasetSettings.form.retrievalSetting.title')}
|
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={
|
valueIcon={
|
||||||
<Image
|
<Image
|
||||||
className='size-4'
|
className='size-4'
|
||||||
|
|||||||
@ -48,8 +48,8 @@ export const useRetrievalSetting = (indexMethod?: IndexMethodEnum) => {
|
|||||||
return {
|
return {
|
||||||
id: RetrievalSearchMethodEnum.keywordSearch,
|
id: RetrievalSearchMethodEnum.keywordSearch,
|
||||||
icon: HybridSearch as any,
|
icon: HybridSearch as any,
|
||||||
title: t('dataset.retrieval.invertedIndex.title'),
|
title: t('dataset.retrieval.keyword_search.title'),
|
||||||
description: t('dataset.retrieval.invertedIndex.description'),
|
description: t('dataset.retrieval.keyword_search.description'),
|
||||||
effectColor: 'purple',
|
effectColor: 'purple',
|
||||||
}
|
}
|
||||||
}, [t])
|
}, [t])
|
||||||
|
|||||||
@ -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.',
|
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',
|
recommend: 'Recommend',
|
||||||
},
|
},
|
||||||
invertedIndex: {
|
keyword_search: {
|
||||||
title: 'Inverted Index',
|
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.',
|
description: 'Inverted Index is a structure used for efficient retrieval. Organized by terms, each term points to documents or web pages containing it.',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -126,7 +126,7 @@ const translation = {
|
|||||||
description: '同时执行全文检索和向量检索,并应用重排序步骤,从两类查询结果中选择匹配用户问题的最佳结果,用户可以选择设置权重或配置重新排序模型。',
|
description: '同时执行全文检索和向量检索,并应用重排序步骤,从两类查询结果中选择匹配用户问题的最佳结果,用户可以选择设置权重或配置重新排序模型。',
|
||||||
recommend: '推荐',
|
recommend: '推荐',
|
||||||
},
|
},
|
||||||
invertedIndex: {
|
keyword_search: {
|
||||||
title: '倒排索引',
|
title: '倒排索引',
|
||||||
description: '倒排索引是一种用于高效检索的结构。按术语组织,每个术语指向包含它的文档或网页',
|
description: '倒排索引是一种用于高效检索的结构。按术语组织,每个术语指向包含它的文档或网页',
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user