1. DB部分
将搜索库的yhb_search.es_word_def表数据拷贝到yhb_operation的schema去
2. Canal部分
2.1 增加监听yhb_operation.es_word_def表
vi /opt/canal.deployer-1.0.20/conf/operations/instance.properties
canal.instance.filter.regex = yhb_operations.activity_product,yhb_operations.es_word_def
2.2 增加监听yh_shops.product_price_plan表
vi /opt/canal.deployer-1.0.20/conf/shops/instance.properties
canal.instance.filter.regex=yh_shops.brand,yh_shops.goods,yh_shops.goods_images,yh_shops.product,yh_shops.product_color,yh_shops.product_price,yh_shops.product_sort,yh_shops.product_standard_relation,yh_shops.product_style_relation,yh_shops.size,yh_shops.storage,yh_shops.standard,yh_shops.style,yh_shops.product_activities_link,yh_shops.product_search,yh_shops.parameter_make,yh_shops.search_action,yh_shops.product_keywords,yh_shops.product_price_plan
2.3 增加监听机器人问答的问题表
vi /opt/canal.deployer-1.0.20/conf/canal.properties
canal.destinations = shops,operations,erpproduct,erpcustomerservice
mkdir /opt/canal.deployer-1.0.20/conf/erpcustomerservice
vi /opt/canal.deployer-1.0.20/conf/erpcustomerservice/instance.properties
#################################################
## mysql serverId
canal.instance.mysql.slaveId = 24209
# position info
canal.instance.master.address = 192.168.102.219:3306
canal.instance.master.journal.name =
canal.instance.master.position =
canal.instance.master.timestamp =
#canal.instance.standby.address =
#canal.instance.standby.journal.name =
#canal.instance.standby.position =
#canal.instance.standby.timestamp =
# username/password
canal.instance.dbUsername = yh_test
canal.instance.dbPassword = yh_test
canal.instance.defaultDatabaseName = erp_customer_service
canal.instance.connectionCharset = UTF-8
# table regex
canal.instance.filter.regex=erp_customer_service.robot_question# table black regex
canal.instance.filter.black.regex =
#################################################
2.4 重启Canal
sh /opt/canal.deployer-1.0.20/bin/stop.sh sh /opt/canal.deployer-1.0.20/bin/startup.sh
3. ES部分
4. autoconfig配置部分
4.1 consumer增加suggest相关参数
#suggestion count config
suggestion.count.batch.limit=300
suggestion.count.batch.max.thread.size=3
5. 其他
机器人sql
SET FOREIGN_KEY_CHECKS=0;
-- Table structure for robot_question
DROP TABLE IF EXISTS robot_question
;
CREATE TABLE robot_question
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
sort_id
int(11) NOT NULL DEFAULT '0' COMMENT '分类ID',
question
varchar(255) NOT NULL COMMENT '问题',
answer
text NOT NULL COMMENT '答案',
pid
int(11) NOT NULL DEFAULT '0' COMMENT '创建人',
create_time
int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
is_disable
int(11) NOT NULL DEFAULT '2' COMMENT '是否禁用 1为是 2为否',
effect_time
int(11) NOT NULL DEFAULT '0' COMMENT '生效时间',
update_pid
int(11) NOT NULL DEFAULT '0' COMMENT '修改人',
update_time
int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
question_seq
int(11) NOT NULL DEFAULT '0' COMMENT '显示顺序',
click_times
int(11) NOT NULL DEFAULT '0' COMMENT '点击次数',
PRIMARY KEY (id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Records of robot_question