mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
[improvement][Headless] Fix the caching issue in struct queries and add headless test cases. (#689)
This commit is contained in:
@@ -272,7 +272,8 @@ public class QueryStructReq extends SemanticQueryReq {
|
||||
}
|
||||
|
||||
public String getModelName() {
|
||||
return Objects.nonNull(modelName) ? modelName : "m_" + String.valueOf(StringUtils.join(modelIds, "_"));
|
||||
return Objects.nonNull(modelName) ? modelName :
|
||||
Constants.TABLE_PREFIX + StringUtils.join(modelIds, "_");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,13 +19,12 @@ public abstract class SemanticQueryReq {
|
||||
|
||||
protected boolean needAuth = true;
|
||||
|
||||
protected Set<Long> modelIds;
|
||||
protected Set<Long> modelIds = new HashSet<>();
|
||||
protected List<Param> params = new ArrayList<>();
|
||||
|
||||
protected Cache cacheInfo = new Cache();
|
||||
|
||||
public void setModelId(Long modelId) {
|
||||
modelIds = new HashSet<>();
|
||||
public void addModelId(Long modelId) {
|
||||
modelIds.add(modelId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user