榆林哪里做网站,网站建设需求分析的功能,百度一下首页网页百度,wordpress4 sqlite1、ES搜索引擎,高性能的分布式搜索引擎,底层基于Lucene
主要用于应用程序中的搜索系统
日志收集 2、基础概念 3、ES处理流程 5、下载中文分词器
Releases infinilabs/analysis-ik GitHub
6、分词模式
最细粒度拆分、智能分词 7、Elaticsearch配置流程
(1)把文件拖进…1、ES搜索引擎,高性能的分布式搜索引擎,底层基于Lucene
主要用于应用程序中的搜索系统
日志收集 2、基础概念 3、ES处理流程 5、下载中文分词器
Releases · infinilabs/analysis-ik · GitHub
6、分词模式
最细粒度拆分、智能分词 7、Elaticsearch配置流程
(1)把文件拖进去,然后执行 (2)访问Elastic 8、分词器 9、客户端集成的三种方式(第二种用的多) 10、es返回的是对象本身,更新本质是保存的操作
11、statement模式默认值丢失、row模式不会、智能模式 12、Query 复杂查询(用第三个) 13、ES语法 查询所有行跟列 MatchAllQueryBuilder 过滤行 限定符 逻辑 must() and should() or 模糊查询 WildcardQueryBuilder 精确查询 MatchPhraseQueryBuilder 范围判断 between and RangeQueryBuilder,gt、lt、gte 包含 in 分组统计 排序 权重 综合排序 @Testpublic void search(){//查询所有MatchAllQueryBuilder matchAllQueryBuilder = QueryBuilders.matchAllQuery();//分页NativeSearchQuery nativeSearchQuery = new NativeSearchQuery(matchAllQueryBuilder);nativeSearchQuery.setPageable(PageRequest.of(0,100));SearchHitsEsProduct searchHits = elasticsearchRestTemplate.search(nativeSearchQuery, EsProduct.class);ListEsProduct esProducts = searchHits.stream().map(SearchHit::getContent).collect(Collectors.toList());log.info(esProducts.toString());}
14、模糊查询
? 单个单词* 匹配多个
匹配的内容如果是多个中文
多个中文单词匹配在查询字段后面使用.keyword 15、ES使用流程(先部署上去7) (1)导包
dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-data-elasticsearch/artifactId/dependency
(2)配置
server:port: 8081
spring:elasticsearch:uris: "http://129.204.151.181:9200"username: ""password: ""connection-timeout: 2s
(3)写实体类
package com.smart.community.es.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 java.math.BigDecimal;
import java.util.List;/*** @auth