refactor: update retrieval search method from invertedIndex to keywordSearch

pull/21398/head
twwu 12 months ago
parent bad451d5ec
commit 7039ec33b9

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

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

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

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

Loading…
Cancel
Save