Created
April 27, 2018 02:10
-
-
Save asd1245dss/f199555285537b4df0b42f4987056f22 to your computer and use it in GitHub Desktop.
全清键(AC)按下该键表示清除所有寄存器中的数值。
清除输入键(CE)在数字输入期间按下此键将清除输入寄存器中的值并显示"0"。
AC = All Clear
CE = Clear Entr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.evcard.demo.test.elastic.search; | |
import lombok.extern.slf4j.Slf4j; | |
import org.apache.http.HttpHost; | |
import org.elasticsearch.action.search.SearchRequest; | |
import org.elasticsearch.action.search.SearchResponse; | |
import org.elasticsearch.client.RestClient; | |
import org.elasticsearch.client.RestHighLevelClient; | |
import org.elasticsearch.index.query.QueryBuilder; | |
import org.elasticsearch.index.query.QueryBuilders; | |
import org.elasticsearch.index.query.QueryStringQueryBuilder; | |
import org.elasticsearch.search.aggregations.AggregationBuilders; | |
import org.elasticsearch.search.builder.SearchSourceBuilder; | |
import java.io.IOException; | |
/** | |
* @author Li Changwei | |
* @version 2018-04-26 17:40 | |
*/ | |
@Slf4j | |
public class ElasticQueryBuilder { | |
public static void main(String[] args) throws IOException { | |
RestHighLevelClient client = new RestHighLevelClient( | |
RestClient.builder( | |
new HttpHost("192.168.99.100", 9200, "http"))); | |
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder(); | |
SearchRequest searchRequest = new SearchRequest(); | |
searchRequest.indices("test"); | |
searchRequest.searchType("bank"); | |
searchRequest.source(searchSourceBuilder); | |
SearchResponse searchResponse = client.search(searchRequest); | |
System.out.println(searchResponse); | |
client.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment