|
|
|
@ -43,7 +43,7 @@ public class SimilarityUtil {
|
|
|
|
|
// 添加条件,只匹配对应标准问的问题
|
|
|
|
|
if (CollUtil.isNotEmpty(libraryQuestionIdList)) {
|
|
|
|
|
FilterExpressionBuilder b = new FilterExpressionBuilder();
|
|
|
|
|
searchRequest.withFilterExpression(b.in("libraryQuestionId", libraryQuestionIdList).build());
|
|
|
|
|
searchRequest.withFilterExpression(b.in("libraryQuestionId", new ArrayList<>(libraryQuestionIdList)).build());
|
|
|
|
|
}
|
|
|
|
|
// 走Redis向量库进行比较,找出最高的top10
|
|
|
|
|
List<Document> documents = redisVectorStore.similaritySearch(searchRequest);
|
|
|
|
|