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
Sep 14, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9fab267a
Expand all
Hide 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 @@
# @email : litao@igengmei.com
# @author : litao
from
elasticsearch
import
Elasticsearch
exists_es_dic
=
{}
es
=
Elasticsearch
([
{
'host'
:
'172.16.31.17'
,
...
...
@@ -16,6 +16,9 @@ es = Elasticsearch([
def
get_device_num_from_es
(
word
):
if
word
in
exists_es_dic
:
return
exists_es_dic
[
word
]
results
=
es
.
search
(
index
=
'gm-dbmw-device'
,
doc_type
=
'doc'
,
...
...
@@ -159,6 +162,7 @@ def get_device_num_from_es(word):
}
)
tractate_content_num
=
results
[
"hits"
][
"total"
]
exists_es_dic
[
word
]
=
tractate_content_num
return
tractate_content_num
...
...
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