feat: 增加知识库新类型FAQ知识库
This commit is contained in:
@@ -4,7 +4,6 @@ import com.easyagents.engine.es.ElasticSearcher;
|
||||
import com.easyagents.search.engine.lucene.LuceneSearcher;
|
||||
import com.easyagents.search.engine.service.DocumentSearcher;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -29,6 +28,9 @@ public class SearcherFactory {
|
||||
|
||||
|
||||
public DocumentSearcher getSearcher(String defaultSearcherType) {
|
||||
if (defaultSearcherType == null) {
|
||||
defaultSearcherType = "lucene";
|
||||
}
|
||||
switch (defaultSearcherType) {
|
||||
case "elasticSearch":
|
||||
return new ElasticSearcher(aiEsConfig);
|
||||
@@ -37,4 +39,4 @@ public class SearcherFactory {
|
||||
return new LuceneSearcher(luceneConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user