当前位置: 首页 > news >正文

做网站需要走公司吗谷歌关键词优化怎么做

做网站需要走公司吗,谷歌关键词优化怎么做,电子商务网站建设的认识的心得,广州 电商设计网站建设一、版本 spring-boot版本:2.3.7.RELEASEElasticsearch7.8.0版本说明详见 二、Elasticsearch 下载和安装 Elasticsearch 下载 kibana下载 ik分词器下载 配置IK分词器 2.1 解压,在elasticsearch-7.8.0\plugins 路径下新建ik目录 2.2 将ik分词器解压放…

一、版本

spring-boot版本:2.3.7.RELEASEElasticsearch7.8.0

在这里插入图片描述

版本说明详见

二、Elasticsearch 下载和安装

Elasticsearch 下载
kibana下载
ik分词器下载

配置IK分词器

2.1 解压,在elasticsearch-7.8.0\plugins 路径下新建ik目录

在这里插入图片描述

2.2 将ik分词器解压放入ik目录

在这里插入图片描述

2.3 扩展词汇测试示例

2.3.1 ik/config 目录下新建custom.dic文件

在这里插入图片描述

2.3.2 编辑custom.dic文件,加入新词汇

注意:custom.dic文件内容的格式的编码为UTF-8格式编码,否则会导致扩展词汇失效。
在这里插入图片描述

2.3.3 打开 IKAnalyzer.cfg.xml 文件,将新建的 custom.dic 配置其中,如下图

在这里插入图片描述

2.4 编辑kibana.yml ,修改kibana配置

在这里插入图片描述

三、新建Springboot项目,整合Elasticsearch并测试

3.1 加入依赖,配置

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
spring: main: allow-bean-definition-overriding: true elasticsearch:rest:uris: http://localhost:9200

3.2 新建实体类SkuEs


@Data
@Document(indexName = "skues" ,shards = 3,replicas = 1)
public class SkuEs {// 商品Id= skuId@Idprivate Long id;@Field(type = FieldType.Text, analyzer = "ik_max_word")private String keyword;@Field(type = FieldType.Integer, index = false)private Integer skuType;@Field(type = FieldType.Integer, index = false)private Integer isNewPerson;@Field(type = FieldType.Long)private Long categoryId;@Field(type = FieldType.Text)private String categoryName;@Field(type = FieldType.Keyword, index = false)private String imgUrl;//  es 中能分词的字段,这个字段数据类型必须是 text!keyword 不分词!@Field(type = FieldType.Text)private String title;@Field(type = FieldType.Double)private Double price;@Field(type = FieldType.Integer, index = false)private Integer stock;@Field(type = FieldType.Integer, index = false)private Integer perLimit;@Field(type = FieldType.Integer, index = false)private Integer sale;@Field(type = FieldType.Long)private Long wareId;//  商品的热度!@Field(type = FieldType.Long)private Long hotScore = 0L;@Field(type = FieldType.Object, index = false)private List<String> ruleList;}

3.2 新建接口SkuRepository

public interface SkuRepository extends ElasticsearchRepository<SkuEs,Long> {}

3.3 测试

@Service
public class SkuServiceImpl implements SkuService {@Autowiredprivate SkuRepository skuRepository;@Overridepublic void upperSku(Long skuId) {//  3 调用方法添加ESSkuEs skuEs = new SkuEs();skuEs.setCategoryId(11111l);skuEs.setCategoryName("name");skuEs.setId(1123l);skuEs.setKeyword("keyword");skuEs.setWareId(1123l);skuEs.setIsNewPerson(12);skuEs.setImgUrl("url");skuEs.setTitle("SkuName");skuEs.setSkuType(0);skuEs.setPrice(123.1);skuEs.setStock(11);skuEs.setSale(21);skuEs.setPerLimit(123);skuRepository.save(skuEs);}
}

3.4 运行结果

打开kibana控制台:http://localhost:5601/app/kibana#/dev_tools/console
在这里插入图片描述

http://www.hkea.cn/news/917704/

相关文章:

  • 网站运维可以做哪些域名查询网站入口
  • 网站开发的基本语言外贸平台自建站
  • 女生自己做网站营销方法有哪些
  • 怎么自己做网站吓别人金融网站推广圳seo公司
  • 彩票网站的客服有做吗海淀seo搜索优化多少钱
  • 河源哪有做网站网页模板设计
  • 手机网站可以做英文版本吗近三天时政热点
  • 怎么做网站游戏网络优化排名培训
  • ic外贸网站建设黑帽seo技巧
  • 实业有限公司网站怎么做百度一下了你就知道官网
  • 企业电子商务网站推广平台有哪些渠道
  • 本地用织梦做网站百度的网站网址
  • 基础展示营销型型网站新闻发稿平台有哪些
  • 做游戏赚钱的网站最新新闻热点事件2022
  • 商务网站建设哪家好推广代理公司
  • 自己做网站是否要买云主机西安百度提升优化
  • 成都注册公司哪个区好分析网站推广和优化的原因
  • 模板建站杭州seo泽成
  • 济南网站建设公司川芎网络怎么注册自己的网址
  • linux下安装wordpress关键词优化排名查询
  • wordpress手机网站怎么做中央电视台一套广告价目表
  • 百家号如何给网站做推广推广方案是什么
  • 西安三网合一网站建设产品线上推广方案
  • 2023年免费b站入口百度网站优化
  • 响应式网站建设有利于seo网站发布与推广方案
  • 网页制作教程课件seo推广排名重要吗
  • 小规模纳税人企业所得税怎么征收广州seo招聘
  • 济南企业自助建站网络营销策划公司
  • iis 新建网站 要登录温州seo推广外包
  • 个人想做企业网站备案惠州seo代理商