Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
3e6aaa81
Commit
3e6aaa81
authored
Aug 25, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志新增耗时
parent
b57ffbae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
+2
-3
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/es/ItemEsDao.java
View file @
3e6aaa81
...
@@ -121,7 +121,7 @@ public class ItemEsDao {
...
@@ -121,7 +121,7 @@ public class ItemEsDao {
logger
.
info
(
"查询语句 : {}"
,
searchRequest
.
toString
());
logger
.
info
(
"查询语句 : {}"
,
searchRequest
.
toString
());
SearchResponse
<
ItemOfEs
>
searchResponse
=
elasticsearchClient
.
search
(
searchRequest
,
ItemOfEs
.
class
);
SearchResponse
<
ItemOfEs
>
searchResponse
=
elasticsearchClient
.
search
(
searchRequest
,
ItemOfEs
.
class
);
long
total
=
searchResponse
.
hits
().
total
().
value
();
long
total
=
searchResponse
.
hits
().
total
().
value
();
logger
.
info
(
"总数据量 : {}
"
,
total
);
logger
.
info
(
"总数据量 : {}
, 耗时 : {}"
,
total
,
searchResponse
.
took
()
);
List
<
Hit
<
ItemOfEs
>>
hitList
=
searchResponse
.
hits
().
hits
();
List
<
Hit
<
ItemOfEs
>>
hitList
=
searchResponse
.
hits
().
hits
();
List
<
Long
>
idList
=
new
ArrayList
<>();
List
<
Long
>
idList
=
new
ArrayList
<>();
for
(
Hit
<
ItemOfEs
>
itemOfEsHit
:
hitList
)
{
for
(
Hit
<
ItemOfEs
>
itemOfEsHit
:
hitList
)
{
...
@@ -256,8 +256,7 @@ public class ItemEsDao {
...
@@ -256,8 +256,7 @@ public class ItemEsDao {
SearchRequest
searchRequest
=
builder
.
build
();
SearchRequest
searchRequest
=
builder
.
build
();
logger
.
info
(
"提示词查询语句 : {}"
,
searchRequest
.
toString
());
logger
.
info
(
"提示词查询语句 : {}"
,
searchRequest
.
toString
());
SearchResponse
<
ItemOfEs
>
searchResponse
=
elasticsearchClient
.
search
(
searchRequest
,
ItemOfEs
.
class
);
SearchResponse
<
ItemOfEs
>
searchResponse
=
elasticsearchClient
.
search
(
searchRequest
,
ItemOfEs
.
class
);
long
total
=
searchResponse
.
hits
().
total
().
value
();
logger
.
info
(
"提示词查询耗时 : {}"
,
searchResponse
.
took
());
logger
.
info
(
"总数据量 : {}"
,
total
);
List
<
Hit
<
ItemOfEs
>>
hitList
=
searchResponse
.
hits
().
hits
();
List
<
Hit
<
ItemOfEs
>>
hitList
=
searchResponse
.
hits
().
hits
();
for
(
Hit
<
ItemOfEs
>
itemOfEsHit
:
hitList
)
{
for
(
Hit
<
ItemOfEs
>
itemOfEsHit
:
hitList
)
{
ItemOfEs
itemOfEs
=
itemOfEsHit
.
source
();
ItemOfEs
itemOfEs
=
itemOfEsHit
.
source
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment