Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多路召回融合排序 #23

Merged
merged 7 commits into from
Jan 26, 2025
Merged

多路召回融合排序 #23

merged 7 commits into from
Jan 26, 2025

Conversation

2511689622
Copy link
Contributor

No description provided.

@opensourceways-robot
Copy link

开始门禁检查,等门禁检查通过后可以合入

@opensourceways-robot
Copy link

检查项 状态 日志
Check代码检查 查看日志
敏感信息扫描 查看日志
安全编码扫描 查看日志
流水线链接 点击跳转

Copy link
Collaborator

@ZWJason ZWJason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改

/**
* ES search start
*/
public static final int ES_START = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Es检索下标从0开始

Comment on lines 42 to 44
/**
* 按时间排序
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

统一修改成英文注释

GSearchStrategy gRecall = new GSearchStrategy(gProperties, httpConnectFactory);
MultiSearchContext multirecall = new MultiSearchContext();
//set es search into search contex
multirecall.setSearchStrategy(esRecall);
multirecall.setSearchStrategy(gRecall);
//do recall and fetch the result
DataComposite multiRecallRes = multirecall.executeMultiSearch(condition);
if ("desc".equals(condition.getSort())) {
return multiRecallRes.getChild(0).getResList();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注意下标

Comment on lines +207 to +211
int year = Integer.parseInt(parts[0]);
int month = Integer.parseInt(parts[1]);
int day = Integer.parseInt(parts[2]);
List<Double> dateWeight = fuProperties.getDateWeight();
score += (year * dateWeight.get(0) + month * dateWeight.get(1) + day * dateWeight.get(2));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try catch异常,避免split(-) 出现错误,导致下标越界

Comment on lines +207 to +211
int year = Integer.parseInt(parts[0]);
int month = Integer.parseInt(parts[1]);
int day = Integer.parseInt(parts[2]);
List<Double> dateWeight = fuProperties.getDateWeight();
score += (year * dateWeight.get(0) + month * dateWeight.get(1) + day * dateWeight.get(2));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

出错后设置默认分数

Copy link
Collaborator

@ZWJason ZWJason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修改

@@ -94,6 +95,9 @@ public Component search(SearchCondition condition) {
* @throws IOException
*/
private Component searchByCondition(SearchCondition condition) throws ServiceImplException, IOException {
if (!"".equals(condition.getType())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

添加注释

@opensourceways-robot
Copy link

开始门禁检查,等门禁检查通过后可以合入

@@ -211,6 +212,9 @@ public void reCaculateScore(Map<String, Object> entity) {
score += (year * dateWeight.get(0) + month * dateWeight.get(1) + day * dateWeight.get(2));
entity.put("score", score);
}
} catch (Exception e) {
LOGGER.error("es recall score caculate error: {}", e.getMessage());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

服务器中不打印具体错误信息

@opensourceways-robot
Copy link

检查项 状态 日志
Check代码检查 查看日志
敏感信息扫描 查看日志
安全编码扫描 查看日志
流水线链接 点击跳转

@opensourceways-robot
Copy link

开始门禁检查,等门禁检查通过后可以合入

@opensourceways-robot
Copy link

检查项 状态 日志
Check代码检查 查看日志
敏感信息扫描 查看日志
安全编码扫描 查看日志
流水线链接 点击跳转

@ZWJason ZWJason merged commit f0672e9 into release/multiRecall Jan 26, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants