Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋柯
meta_base_code
Commits
069679c8
Commit
069679c8
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9fab267a
master
mr/develop/zhao
zhao625
zhao626
zhao82
No related merge requests found
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ecommerce_income_report.py
task/ecommerce_income_report.py
+0
-0
func_from_es_get_article.py
utils/func_from_es_get_article.py
+5
-1
No files found.
task/ecommerce_income_report.py
0 → 100644
View file @
069679c8
This diff is collapsed.
Click to expand it.
utils/func_from_es_get_article.py
View file @
069679c8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# @email : litao@igengmei.com
# @email : litao@igengmei.com
# @author : litao
# @author : litao
from
elasticsearch
import
Elasticsearch
from
elasticsearch
import
Elasticsearch
exists_es_dic
=
{}
es
=
Elasticsearch
([
es
=
Elasticsearch
([
{
{
'host'
:
'172.16.31.17'
,
'host'
:
'172.16.31.17'
,
...
@@ -16,6 +16,9 @@ es = Elasticsearch([
...
@@ -16,6 +16,9 @@ es = Elasticsearch([
def
get_device_num_from_es
(
word
):
def
get_device_num_from_es
(
word
):
if
word
in
exists_es_dic
:
return
exists_es_dic
[
word
]
results
=
es
.
search
(
results
=
es
.
search
(
index
=
'gm-dbmw-device'
,
index
=
'gm-dbmw-device'
,
doc_type
=
'doc'
,
doc_type
=
'doc'
,
...
@@ -159,6 +162,7 @@ def get_device_num_from_es(word):
...
@@ -159,6 +162,7 @@ def get_device_num_from_es(word):
}
}
)
)
tractate_content_num
=
results
[
"hits"
][
"total"
]
tractate_content_num
=
results
[
"hits"
][
"total"
]
exists_es_dic
[
word
]
=
tractate_content_num
return
tractate_content_num
return
tractate_content_num
...
...
This diff is collapsed.
Click to expand it.
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