mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 04:57:28 +00:00
(fix)(headless) Fix queryText replaced when semantic retrieval to term descriptions (#1469)
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -17,9 +17,6 @@ public class TermDescMapper extends BaseMapper {
|
||||
public void doMap(ChatQueryContext chatQueryContext) {
|
||||
List<SchemaElement> termDescriptionToMap = chatQueryContext.getMapInfo().getTermDescriptionToMap();
|
||||
if (CollectionUtils.isEmpty(termDescriptionToMap)) {
|
||||
if (StringUtils.isNotBlank(chatQueryContext.getOriQueryText())) {
|
||||
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(chatQueryContext.getOriQueryText())) {
|
||||
@@ -32,6 +29,9 @@ public class TermDescMapper extends BaseMapper {
|
||||
}
|
||||
chatQueryContext.setQueryText(schemaElement.getDescription());
|
||||
}
|
||||
if (CollectionUtils.isEmpty(chatQueryContext.getMapInfo().getTermDescriptionToMap())) {
|
||||
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user