|
|
@@ -7,7 +7,6 @@ import java.util.function.ToDoubleFunction;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.tzld.videoVector.api.VideoApiService;
|
|
|
import com.tzld.videoVector.common.constant.VectorConstants;
|
|
|
-import com.tzld.videoVector.common.enums.ContentTypeEnum;
|
|
|
import com.tzld.videoVector.common.enums.Modality;
|
|
|
import com.tzld.videoVector.common.enums.PointTypeEnum;
|
|
|
import com.tzld.videoVector.common.enums.SourceTypeEnum;
|
|
|
@@ -344,9 +343,6 @@ public class VectorRecallTestServiceImpl implements VectorRecallTestService {
|
|
|
log.info("batchByText: queryText={}, configCodes={}, recallK={}, displayK={}, enrichK={}",
|
|
|
queryText, configCodes, recallK, displayK, enrichK);
|
|
|
|
|
|
- // 预加载 config → contentType 映射,避免按无关模态执行 ANN
|
|
|
- Map<String, Short> ctByCode = loadContentTypeMap(configCodes);
|
|
|
-
|
|
|
// ============================================================
|
|
|
// 阶段一:平行 ANN(不做 enrich),收集原始匹配
|
|
|
// ============================================================
|
|
|
@@ -361,10 +357,12 @@ public class VectorRecallTestServiceImpl implements VectorRecallTestService {
|
|
|
|
|
|
for (String configCode : configCodes) {
|
|
|
final String cc = configCode;
|
|
|
- Short ct = ctByCode.get(cc);
|
|
|
- boolean doVideo = needVideo && appliesToModality(ct, ContentTypeEnum.VIDEO.getCode());
|
|
|
- boolean doMaterial = needMaterial && appliesToModality(ct, ContentTypeEnum.IMAGE_TEXT.getCode());
|
|
|
- boolean doArticle = needArticle && appliesToModality(ct, ContentTypeEnum.ARTICLE.getCode());
|
|
|
+ // TODO 临时方案:还原 2026-06-15 的 content_type 性能优化。
|
|
|
+ // 线上共享 configCode 同时写入 video/material/article 三张向量表,旧配置 content_type=1
|
|
|
+ // 会导致 batchByText 误跳过视频和素材召回;后续应改为显式 configCode->modality 映射后再恢复过滤。
|
|
|
+ boolean doVideo = needVideo;
|
|
|
+ boolean doMaterial = needMaterial;
|
|
|
+ boolean doArticle = needArticle;
|
|
|
|
|
|
if (doVideo) {
|
|
|
futures.add(CompletableFuture.runAsync(() -> {
|
|
|
@@ -2788,4 +2786,3 @@ public class VectorRecallTestServiceImpl implements VectorRecallTestService {
|
|
|
List<String> images;
|
|
|
}
|
|
|
}
|
|
|
-
|