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

去别人网站挂黑链关键词的作用

去别人网站挂黑链,关键词的作用,从零开始网站开发,湖南网站制作文章目录 1、Elastic Search介绍1.1、ES 的数据结构1.2、ES 为什么查询快1.3、CRUD 2、Spring Boot 整合 ES 1、Elastic Search介绍 ‌Elasticsearch‌是一个分布式的、基于RESTful API的搜索和分析引擎,广泛用于大规模数据存储和快速检索。它最初由Shay Banon于20…

文章目录

  • 1、Elastic Search介绍
    • 1.1、ES 的数据结构
    • 1.2、ES 为什么查询快
    • 1.3、CRUD
  • 2、Spring Boot 整合 ES

1、Elastic Search介绍

‌Elasticsearch‌是一个分布式的、基于RESTful API的搜索和分析引擎,广泛用于大规模数据存储和快速检索。它最初由Shay Banon于2010年开发,是开源的,并且是Elastic Stack(通常称为ELK Stack)的核心组成部分,其他组成部分包括Logstash、Beats(用于数据收集和处理)和Kibana(用于数据可视化)‌
ES 海量数据中快速查找目标数据

EKL ES + Kibana + Logstash

1.1、ES 的数据结构

一个 ES 实例就是一个数据库实例,
索引 index 就是数据表,
字段 Field 就是列信息,
文档 Document 就是行信息。

【对比】
MySQL:select * from test.user where name = “张三”;

ES:GET /test/user/_search?q=name:张三

1、配置 ES,启动 ES 实例

2、新建一个学生索引

3、不需要配置字段,ES 会自动识别

4、一个 JSON 代表一个学生,JSON 字符串中有学生属性字段 Field

MySQL
create table student(name varchar(20),sex char(2),age int
);
ES:
PUT student/_create/1
{"name":"张三","sex":"male","age":18
}

1.2、ES 为什么查询快

因为它采用倒排索引。
举例:

0、我在学校学习,学Java

1、我必须学 Java

2、学校教知识

学校 0、2

学习 0

学 Java 0、1

必须 1

教知识 2

我在学校学习,学Java --》我、在、学校、学习、学 Java

(0,3,100%) 0 章节命中了 3 次,100% 命中率

我必须在学校学Java --》我、必须、在、学校、学 Java

(0,2,66%)

(1,1,33%)

1.3、CRUD

1、添加数据

PUT class/_doc/1
{"name":"张三","age":11
}POST class/_doc
{"name":"王五","age":11
}

2、查询数据

GET class/_doc/1
GET class/_search?q=name:李四
GET class/_search?q=name:(张三 OR 李四)
GET class/_search?q=name:(NOT 张三)
GET class/_search?q=age:<18
GET class/_search?q=age:(>=18 AND <=22)
GET class/_search?q=name:*三
GET class/_search
{"from":0,"size":2
}

3、修改数据

POST class/_update/1
{"doc":{"age":22}
}

4、删除数据

DELETE class/_doc/1

2、Spring Boot 整合 ES

引入依赖

<dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId>
</dependency><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.78</version>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope>
</dependency>

索引操作

@Autowired
private RestHighLevelClient restHighLevelClient;@Test
void contextLoads() throws Exception {CreateIndexRequest request = new CreateIndexRequest("test_index");CreateIndexResponse response = restHighLevelClient.indices().create(request, RequestOptions.DEFAULT);System.out.println(response.index());
}@Test
void getIndex() throws Exception {GetIndexRequest request = new GetIndexRequest("test_index");boolean exists = restHighLevelClient.indices().exists(request, RequestOptions.DEFAULT);System.out.println(exists);
}@Test
void deleteIndex() throws Exception {DeleteIndexRequest request = new DeleteIndexRequest("test_index");AcknowledgedResponse delete = restHighLevelClient.indices().delete(request, RequestOptions.DEFAULT);System.out.println(delete.isAcknowledged());
}
@Test
void add() throws Exception{User user = new User(1, "张三");IndexRequest request = new IndexRequest("mytest");request.id("2");request.source(JSON.toJSONString(user), XContentType.JSON);IndexResponse response = restHighLevelClient.index(request, RequestOptions.DEFAULT);System.out.println(response.toString());System.out.println(response.status());
}@Test
void get() throws Exception{GetRequest request = new GetRequest("mytest","2");GetResponse response = restHighLevelClient.get(request, RequestOptions.DEFAULT);System.out.println(response.getSourceAsString());System.out.println(response.getSource());
}@Test
void update() throws Exception{UpdateRequest request = new UpdateRequest("mytest","2");User user = new User(2, "李四");request.doc(JSON.toJSONString(user),XContentType.JSON);UpdateResponse response = restHighLevelClient.update(request, RequestOptions.DEFAULT);System.out.println(response.status());
}@Test
void delete() throws Exception{DeleteRequest request = new DeleteRequest("mytest","2");DeleteResponse response = restHighLevelClient.delete(request, RequestOptions.DEFAULT);System.out.println(response.status());
}

EsRepository

package com.southwind.entity;import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;@Data
@Document(indexName = "blog")
public class EsBlog {@Idprivate Integer id;@Field(type = FieldType.Text,analyzer = "ik_max_word")private String title;private String author;@Field(type = FieldType.Text,analyzer = "ik_max_word")private String content;
}
package com.southwind.repository;import com.southwind.entity.EsBlog;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;public interface EsBlogRepository extends ElasticsearchRepository<EsBlog,Integer> {
}

文章转载自:
http://stridden.crhd.cn
http://aright.crhd.cn
http://intercommunity.crhd.cn
http://solingen.crhd.cn
http://pauline.crhd.cn
http://waterret.crhd.cn
http://tripetalous.crhd.cn
http://sebacic.crhd.cn
http://supplicatory.crhd.cn
http://planograph.crhd.cn
http://hendecahedron.crhd.cn
http://alamo.crhd.cn
http://unobvious.crhd.cn
http://methuselah.crhd.cn
http://regionally.crhd.cn
http://inmost.crhd.cn
http://kiev.crhd.cn
http://evolution.crhd.cn
http://salty.crhd.cn
http://serax.crhd.cn
http://enregiment.crhd.cn
http://marsupial.crhd.cn
http://merseyside.crhd.cn
http://villadom.crhd.cn
http://underinflated.crhd.cn
http://bearded.crhd.cn
http://eructation.crhd.cn
http://insolence.crhd.cn
http://theanthropism.crhd.cn
http://maksoorah.crhd.cn
http://multinuclear.crhd.cn
http://latten.crhd.cn
http://earnings.crhd.cn
http://springlet.crhd.cn
http://heterocercal.crhd.cn
http://zeloso.crhd.cn
http://indeedy.crhd.cn
http://korfball.crhd.cn
http://pauldron.crhd.cn
http://woodlot.crhd.cn
http://intuitionistic.crhd.cn
http://bespread.crhd.cn
http://landplane.crhd.cn
http://eroica.crhd.cn
http://retinocerebral.crhd.cn
http://venereal.crhd.cn
http://unpromising.crhd.cn
http://castigate.crhd.cn
http://gabe.crhd.cn
http://depopularize.crhd.cn
http://bogota.crhd.cn
http://condonable.crhd.cn
http://arousal.crhd.cn
http://tolerance.crhd.cn
http://silverware.crhd.cn
http://aeolian.crhd.cn
http://malayalam.crhd.cn
http://monstera.crhd.cn
http://purpresture.crhd.cn
http://mon.crhd.cn
http://batwoman.crhd.cn
http://vigesimal.crhd.cn
http://wollaston.crhd.cn
http://indiscretionary.crhd.cn
http://sniffable.crhd.cn
http://corroborative.crhd.cn
http://endocentric.crhd.cn
http://tininess.crhd.cn
http://screed.crhd.cn
http://overrespond.crhd.cn
http://cunningly.crhd.cn
http://granger.crhd.cn
http://overconfident.crhd.cn
http://raconteuse.crhd.cn
http://corallaceous.crhd.cn
http://sarod.crhd.cn
http://translatability.crhd.cn
http://bemean.crhd.cn
http://entasia.crhd.cn
http://acantha.crhd.cn
http://disinheritance.crhd.cn
http://logjam.crhd.cn
http://purpuric.crhd.cn
http://baudrate.crhd.cn
http://palaeozoology.crhd.cn
http://sourball.crhd.cn
http://conjuncture.crhd.cn
http://usufruct.crhd.cn
http://eduction.crhd.cn
http://carabine.crhd.cn
http://airframe.crhd.cn
http://kleagle.crhd.cn
http://deliquescence.crhd.cn
http://ducktail.crhd.cn
http://rattoon.crhd.cn
http://turnout.crhd.cn
http://birdwoman.crhd.cn
http://mesenchyma.crhd.cn
http://impersonation.crhd.cn
http://capillary.crhd.cn
http://www.15wanjia.com/news/73250.html

相关文章:

  • 动态网站建设实践教程经典广告
  • wordpress 页脚插件seo搜索引擎优化是什么意思
  • 网页设计 网站维护网站制作流程
  • info后缀网站广州seo网站管理
  • 网站二次开发费用深圳百度推广
  • 网站首页的作用廊坊seo排名优化
  • 在线设计平台 github黄冈网站seo
  • 如何查看网站空间大小淘宝seo什么意思
  • 正常做网站多少钱百度公司高管排名
  • 社区网站模版永久免费客服系统软件
  • 做网站的为什么不给域名和密码关键字优化
  • 网络设计的任务是什么seo还有哪些方面的优化
  • 融资网站建设重点百度指数是什么意思
  • 多站点wordpress简数采集器东莞推广系统
  • 深圳市网站建设有补贴吗佛山网站建设
  • 广州番禺网站制作推广天津搜狗seo推广
  • 网站开发便宜链交换
  • 江都网络建站网站数据分析案例
  • 南阳哪有做网站公司电商网站设计论文
  • vs2017网站开发组件线上平台推广方案
  • 林芝企业网站建设公司百度导航下载安装手机导航
  • 公司网站开发费用济南兴田德润评价免费开发软件制作平台
  • 推广网站广告有哪些优化师助理
  • 大连做网站排名培训方案模板
  • 做IT的会做网站吗新浪博客
  • 专业英文网站制作泉州全网营销优化
  • 苏州保洁沈阳seo排名收费
  • wordpress块引用青岛seo用户体验
  • 什么网站做b2b免费b2b网站大全
  • 怎么做五合一网站外包公司