随笔分类 - ElasticSearch
摘要:1、scroll深度搜索,查询符合条件的所有数据。如果不是scroll深度搜索默认之后返回20条数据,如果指定分页就返回分页的条数。 package com.example.demo; import org.elasticsearch.action.search.SearchResponse; im
阅读全文
摘要:1、连接elasticseach public class ElasticSearchComponent { TransportClient client = null; public ESClientSettings() { Settings settings = ImmutableSetting
阅读全文
摘要:1、es search sroll 可以遍历索引下所有数据 2、es search sroll 可以遍历索引下所有数据。与上面差别是利用SearchSourceBuilder构造查询条件。
阅读全文
摘要:elasticsearch官方API https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index.html 一、restful api查询 1.1、查询订单 POST order/_search?q=P201
阅读全文
摘要:1、安装JDK:centos删除openJDK,安装JDK,vim /etc/profile配置JAVA_HOME 2、官网下载elasticsearch:https://www.elastic.co/downloads/elasticsearch 3、解压并启动:tar -zxvf /home/e
阅读全文