20161201 upgrade.md 3.01 KB

1. DB部分

1.1 es_word_def表

搜索库删除废弃的数据

delete from es_word_def where word_type in (3,5,6);

将搜索库的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部分

更新ik的jar包

/opt/elasticsearch-2.3.4/plugins/ik/elasticsearch-analysis-ik-1.9.4.jar

修改es的配置文件的ik_complex配置

vi /opt/elasticsearch-2.3.4/config/elasticsearch.yml
ik_complex:
    type: custom
    tokenizer: ik_smart
    filter:
    - lowercase
    - ik_dyn_synonym
    - my_stop
    - lowercase
    - unique

重启ES

sh /opt/elasticsearch-2.3.4/bin/service/elasticsearch stop
sh /opt/elasticsearch-2.3.4/bin/service/elasticsearch start

4. autoconfig配置部分

4.1 consumer增加suggest相关参数

#suggestion count config
suggestion.count.batch.limit=300
suggestion.count.batch.max.thread.size=3

5. 其他