mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-08 20:29:16 +08:00
refactor: update retrieval search method from invertedIndex to keywordSearch
This commit is contained in:
parent
bad451d5ec
commit
7039ec33b9
@ -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'),
|
||||
|
@ -194,7 +194,7 @@ const SearchMethodOption = ({
|
||||
isScoreThresholdEnabled={isScoreThresholdEnabled}
|
||||
onScoreThresholdEnabledChange={onScoreThresholdEnabledChange}
|
||||
readonly={readonly}
|
||||
hiddenScoreThreshold={searchMethod === RetrievalSearchMethodEnum.invertedIndex}
|
||||
hiddenScoreThreshold={searchMethod === RetrievalSearchMethodEnum.keywordSearch}
|
||||
/>
|
||||
</div>
|
||||
</OptionCard>
|
||||
|
@ -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
|
||||
}))
|
||||
|
@ -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'),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user