refactor: update retrieval search method from invertedIndex to keywordSearch

This commit is contained in:
twwu 2025-06-03 18:33:01 +08:00
parent bad451d5ec
commit 7039ec33b9
4 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ export const useRetrievalSetting = (indexMethod?: IndexMethodEnum) => {
}, [t])
const InvertedIndexOption: Option = useMemo(() => {
return {
id: RetrievalSearchMethodEnum.invertedIndex,
id: RetrievalSearchMethodEnum.keywordSearch,
icon: HybridSearch as any,
title: t('dataset.retrieval.invertedIndex.title'),
description: t('dataset.retrieval.invertedIndex.description'),

View File

@ -194,7 +194,7 @@ const SearchMethodOption = ({
isScoreThresholdEnabled={isScoreThresholdEnabled}
onScoreThresholdEnabledChange={onScoreThresholdEnabledChange}
readonly={readonly}
hiddenScoreThreshold={searchMethod === RetrievalSearchMethodEnum.invertedIndex}
hiddenScoreThreshold={searchMethod === RetrievalSearchMethodEnum.keywordSearch}
/>
</div>
</OptionCard>

View File

@ -50,7 +50,7 @@ export const useConfig = (id: string) => {
draft.indexing_technique = indexMethod
if (indexMethod === IndexMethodEnum.ECONOMICAL)
draft.retrieval_model.search_method = RetrievalSearchMethodEnum.invertedIndex
draft.retrieval_model.search_method = RetrievalSearchMethodEnum.keywordSearch
else if (indexMethod === IndexMethodEnum.QUALIFIED)
draft.retrieval_model.search_method = RetrievalSearchMethodEnum.semantic
}))

View File

@ -13,6 +13,6 @@ export const useSettingsDisplay = () => {
[RetrievalSearchMethodEnum.semantic]: t('dataset.retrieval.semantic_search.title'),
[RetrievalSearchMethodEnum.fullText]: t('dataset.retrieval.full_text_search.title'),
[RetrievalSearchMethodEnum.hybrid]: t('dataset.retrieval.hybrid_search.title'),
[RetrievalSearchMethodEnum.invertedIndex]: t('dataset.retrieval.invertedIndex.title'),
[RetrievalSearchMethodEnum.keywordSearch]: t('dataset.retrieval.invertedIndex.title'),
}
}