mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +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) {
|
public void doMap(ChatQueryContext chatQueryContext) {
|
||||||
List<SchemaElement> termDescriptionToMap = chatQueryContext.getMapInfo().getTermDescriptionToMap();
|
List<SchemaElement> termDescriptionToMap = chatQueryContext.getMapInfo().getTermDescriptionToMap();
|
||||||
if (CollectionUtils.isEmpty(termDescriptionToMap)) {
|
if (CollectionUtils.isEmpty(termDescriptionToMap)) {
|
||||||
if (StringUtils.isNotBlank(chatQueryContext.getOriQueryText())) {
|
|
||||||
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(chatQueryContext.getOriQueryText())) {
|
if (StringUtils.isBlank(chatQueryContext.getOriQueryText())) {
|
||||||
@@ -32,6 +29,9 @@ public class TermDescMapper extends BaseMapper {
|
|||||||
}
|
}
|
||||||
chatQueryContext.setQueryText(schemaElement.getDescription());
|
chatQueryContext.setQueryText(schemaElement.getDescription());
|
||||||
}
|
}
|
||||||
|
if (CollectionUtils.isEmpty(chatQueryContext.getMapInfo().getTermDescriptionToMap())) {
|
||||||
|
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user