Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e9ef3bd3
authored
Jun 24, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
聚合匹配返回值添加personPoolId
1 parent
fda29510
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/service/PersonService.java
View file @
e9ef3bd
...
...
@@ -374,6 +374,7 @@ public class PersonService {
}
private
List
<
Person
>
match0
(
SearchRequest
searchRequest
,
Boolean
agg
)
throws
Exception
{
String
poolId
=
searchRequest
.
indices
()[
0
];
List
<
Person
>
persons
=
new
ArrayList
<>();
SearchResponse
search
=
client
.
search
(
searchRequest
,
RequestOptions
.
DEFAULT
);
if
(
agg
)
{
...
...
@@ -384,7 +385,7 @@ public class PersonService {
String
personId
=
(
String
)
bucket
.
getKey
();
Max
maxScore
=
bucket
.
getAggregations
().
get
(
"max_score"
);
double
value
=
maxScore
.
getValue
();
Person
person
=
new
Person
().
setPersonId
(
personId
).
setScore
((
float
)
value
);
Person
person
=
new
Person
().
setPersonId
(
personId
).
setScore
((
float
)
value
)
.
setPersonPoolId
(
poolId
)
;
persons
.
add
(
person
);
}
}
else
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment