Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
search_tips
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
rank
search_tips
Commits
378f5712
Commit
378f5712
authored
Aug 21, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改ID的存储方式
parent
fc38cd07
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
16 deletions
+17
-16
brandwiki_transfer.py
trans2es/utils/brandwiki_transfer.py
+2
-2
collectwiki_transfer.py
trans2es/utils/collectwiki_transfer.py
+2
-2
doctor_transfer.py
trans2es/utils/doctor_transfer.py
+2
-2
hospital_transfer.py
trans2es/utils/hospital_transfer.py
+2
-2
itemwiki_transfer.py
trans2es/utils/itemwiki_transfer.py
+2
-2
productwiki_transfer.py
trans2es/utils/productwiki_transfer.py
+2
-2
search_query.py
trans2es/utils/search_query.py
+2
-2
wordresemble.py
trans2es/utils/wordresemble.py
+3
-2
No files found.
trans2es/utils/brandwiki_transfer.py
View file @
378f5712
...
...
@@ -24,7 +24,7 @@ class BrandWikiTransfer(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
))
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"brandwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"brandwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
@@ -51,7 +51,7 @@ class BrandWikiTransferV1(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
),
type_v1
=
True
)
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"brandwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"brandwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
trans2es/utils/collectwiki_transfer.py
View file @
378f5712
...
...
@@ -24,7 +24,7 @@ class CollectWikiTransfer(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
))
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"collectwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"collectwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
@@ -51,7 +51,7 @@ class CollectWikiTransferV1(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
),
type_v1
=
True
)
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"collectwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"collectwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
trans2es/utils/doctor_transfer.py
View file @
378f5712
...
...
@@ -92,7 +92,7 @@ class DoctorTransfer(object):
suggest_list
=
list
()
if
cut_bool
==
False
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"doctor"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"doctor
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_doctor_query_word_weight
(
name
=
instance
.
name
,
...
...
@@ -190,7 +190,7 @@ class DoctorTransferV1(object):
suggest_list
=
list
()
if
not
cut_bool
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"doctor"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"doctor
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_doctor_query_word_weight
(
name
=
instance
.
name
,
...
...
trans2es/utils/hospital_transfer.py
View file @
378f5712
...
...
@@ -31,7 +31,7 @@ class HospitalTransfer(object):
if
cut_bool
==
False
:
item_dict
=
dict
()
# item_dict["id"] = getMd5Digest(str(name))
item_dict
[
"id"
]
=
"hospital"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"hospital
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
name
item_dict
[
"is_online"
]
=
by_hospital_id_judge_office_online
(
is_online
=
instance
.
is_online
,
hospital_id
=
instance
.
id
,
name
=
name
)
...
...
@@ -83,7 +83,7 @@ class HospitalTransferV1(object):
if
cut_bool
==
False
:
item_dict
=
dict
()
# item_dict["id"] = getMd5Digest(str(name))
item_dict
[
"id"
]
=
"hospital"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"hospital
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
name
item_dict
[
"is_online"
]
=
by_hospital_id_judge_office_online
(
is_online
=
instance
.
is_online
,
hospital_id
=
instance
.
id
,
name
=
name
)
...
...
trans2es/utils/itemwiki_transfer.py
View file @
378f5712
...
...
@@ -90,7 +90,7 @@ class ItemWikiTransfer(object):
logging
.
info
(
"get_wiki_query:
%
s,ret_bol:
%
s"
%
(
instance
.
name
,
ret_bol
))
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"itemwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"itemwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
@@ -181,7 +181,7 @@ class ItemWikiTransferV1(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
),
type_v1
=
True
)
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"itemwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"itemwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
trans2es/utils/productwiki_transfer.py
View file @
378f5712
...
...
@@ -24,7 +24,7 @@ class ProduceWikiTransfer(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
))
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"productwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"productwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
@@ -51,7 +51,7 @@ class ProduceWikiTransferV1(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
name
),
type_v1
=
True
)
if
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.name))
item_dict
[
"id"
]
=
"productwiki"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"productwiki
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
name
item_dict
[
"is_online"
]
=
instance
.
is_online
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
name
)
...
...
trans2es/utils/search_query.py
View file @
378f5712
...
...
@@ -22,7 +22,7 @@ class SearchWord(object):
is_online
=
False
if
ret_bol
:
# item_dict["id"] = getMd5Digest(keyword)
item_dict
[
"id"
]
=
"search_query"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"search_query
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
keyword
total_num
=
QueryWordAttr
.
get_search_query_results_num
(
keyword
)
if
total_num
>
3
:
...
...
@@ -56,7 +56,7 @@ class SearchWord(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
sub_query
,
type_v1
=
True
)
if
ret_bol
:
# item_dict["id"] = getMd5Digest(keyword)
item_dict
[
"id"
]
=
"search_query"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"search_query
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
keyword
if
QueryWordAttr
.
get_search_query_results_num
(
keyword
):
is_online
=
False
if
instance
.
is_delete
else
True
...
...
trans2es/utils/wordresemble.py
View file @
378f5712
...
...
@@ -54,7 +54,7 @@ class WordResemble(object):
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
keyword
))
if
not
cut_bool
and
ret_bol
:
# item_dict["id"] = getMd5Digest(str(instance.keyword))
item_dict
[
"id"
]
=
"resemble"
+
str
(
instance
.
id
)
item_dict
[
"id"
]
=
"resemble
_
"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
keyword
item_dict
[
"is_online"
]
=
True
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
keyword
)
...
...
@@ -241,7 +241,8 @@ class WordResembleV1(object):
cut_bool
=
True
ret_bol
=
QueryWordAttr
.
save_query_to_redis
(
query
=
str
(
instance
.
keyword
),
type_v1
=
True
)
if
not
cut_bool
and
ret_bol
:
item_dict
[
"id"
]
=
getMd5Digest
(
str
(
instance
.
keyword
))
# item_dict["id"] = getMd5Digest(str(instance.keyword))
item_dict
[
"id"
]
=
"resemble_"
+
str
(
instance
.
id
)
item_dict
[
"ori_name"
]
=
instance
.
keyword
item_dict
[
"is_online"
]
=
True
item_dict
[
"order_weight"
]
=
QueryWordAttr
.
get_project_query_word_weight
(
instance
.
keyword
)
...
...
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