4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
新闻详情
Yii2 ElasticSearch的使用 - TinyMeng呀!
来自 : www.majiameng.com/article/14.. 发布时间:2021-03-24
\'id\' = [\'type\' = \'integer\', index = true], \'title\' = [\'type\' = \'text\', index = true, analyzer = \'ik_max_word\',\'search_analyzer\'= \'ik_max_word\'],//ik中文分词 \'type\' = [\'type\' = \'integer\', index = true], \'inputtime\' = [\'type\' = \'integer\', index = true],//文章创建时间 \'updatetime\' = [\'type\' = \'integer\', index = true],//文章更新时间 \'content\' = [\'type\' = \'text\', index = true, analyzer = \'ik_max_word\',\'search_analyzer\'= \'ik_max_word\'],//文章内容 \'other\' = [\'type\' = \'text\', index = false],//\' index = false\' 不进行分词 public static function mapping() return [ static::type() = self::mapConfig(), * Set (update) mappings for this model public static function updateMapping(){ $db = self::getDb(); $command = $db- createCommand(); if(!$command- indexExists(self::index())){ $command- createIndex(self::index()); $command- setMapping(self::index(), self::type(), self::mapping()); public static function getMapping(){ $db = self::getDb(); $command = $db- createCommand(); return $command- getMapping();
2018年8月17日{ return \Yii::$app->get('elasticsearch'); } /** * Description: 定义字段映射的方法 * Author: JiaMeng <666@majiameng.com> * Updater: * @param...Yii2 ElasticSearch的使用Yii2 elasticSearch – 配置配置部分如下:'elasticsearch' =&gt; [ 'class' =&gt; '...Yii2 ElasticSearch的使用

本文链接: http://yiima.immuno-online.com/view-715773.html

发布于 : 2021-03-24 阅读(0)
公司介绍
品牌分类
催化剂和助剂 Others
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616