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
13179ecf
Commit
13179ecf
authored
Aug 28, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步新的表
parent
66f974c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
strategy_search_word.py
trans2es/models/strategy_search_word.py
+1
-1
type_info.py
trans2es/type_info.py
+4
-3
No files found.
trans2es/models/strategy_search_word.py
View file @
13179ecf
...
@@ -26,7 +26,7 @@ class StrategyHistoryQueryUnique(models.Model):
...
@@ -26,7 +26,7 @@ class StrategyHistoryQueryUnique(models.Model):
历史搜索词
历史搜索词
"""
"""
class
Meta
:
class
Meta
:
app_label
=
'
jerry_tidb
'
app_label
=
'
doris
'
db_table
=
'strategy_history_query_unique'
db_table
=
'strategy_history_query_unique'
keyword
=
models
.
CharField
(
u'项目介绍'
,
max_length
=
48
)
keyword
=
models
.
CharField
(
u'项目介绍'
,
max_length
=
48
)
...
...
trans2es/type_info.py
View file @
13179ecf
...
@@ -382,7 +382,7 @@ def get_type_info_map():
...
@@ -382,7 +382,7 @@ def get_type_info_map():
type
=
'search_unique'
,
# tag
type
=
'search_unique'
,
# tag
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
settings
.
JERRY
_DB_NAME
)
.
all
()
.
query
,
settings
.
DORIS
_DB_NAME
)
.
all
()
.
query
,
get_data_func
=
SearchWord
.
get_search_unique
,
get_data_func
=
SearchWord
.
get_search_unique
,
bulk_insert_chunk_size
=
100
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_chunk_size
=
5
,
...
@@ -393,7 +393,7 @@ def get_type_info_map():
...
@@ -393,7 +393,7 @@ def get_type_info_map():
type
=
'search_unique-v1'
,
# tag
type
=
'search_unique-v1'
,
# tag
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
settings
.
JERRY
_DB_NAME
)
.
all
()
.
query
,
settings
.
DORIS
_DB_NAME
)
.
all
()
.
query
,
get_data_func
=
SearchWord
.
get_search_unique
,
get_data_func
=
SearchWord
.
get_search_unique
,
bulk_insert_chunk_size
=
100
,
bulk_insert_chunk_size
=
100
,
round_insert_chunk_size
=
5
,
round_insert_chunk_size
=
5
,
...
@@ -608,7 +608,8 @@ def tips_attr_sync_to_redis_type_info_map():
...
@@ -608,7 +608,8 @@ def tips_attr_sync_to_redis_type_info_map():
name
=
'suggest'
,
name
=
'suggest'
,
type
=
'query_unique_results_num'
,
type
=
'query_unique_results_num'
,
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
model
=
strategy_search_word
.
StrategyHistoryQueryUnique
,
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
"jerry_tidb"
)
.
filter
(
query_deferred
=
lambda
:
strategy_search_word
.
StrategyHistoryQueryUnique
.
objects
.
using
(
settings
.
DORIS_DB_NAME
)
.
filter
(
is_delete
=
False
)
.
query
,
is_delete
=
False
)
.
query
,
get_data_func
=
SearchWord
.
set_data_to_redis
,
get_data_func
=
SearchWord
.
set_data_to_redis
,
bulk_insert_chunk_size
=
100
,
bulk_insert_chunk_size
=
100
,
...
...
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