The best Elasticsearch Highlevel Rest Client API-----bboss v5.9.2 发布。
bboss elasticsearch query dsl based grammar is a set of operations and access to distributed search engine elasticsearch o / r mapping java development of high-performance database, based on the underlying es restful api.
Main Features
-
ElasticSearch Compatibility: 1.x, 2.x, 5.x, 6.x, 7.x, +
-
JDK Compatibility: jdk 1.7+
-
Spring boot Compatibility: 1.x, 2.x
-
Both both DSL and ORM, based mybatis elasticsearch manner,
-
Providing fast and efficient data synchronization tool into ES (DB support to Elasticsearch, Elasticsearch to DB, MongoDB to Elastisearch data synchronization, the subsequent support more data sources)
-
The date and time provided by ES historical data cleanup tool
- APM open source products pinpoint official Elasticsearch bboss client performance monitoring plug-in, plug-in address:
https://github.com/naver/pinpoint/tree/master/plugins/elasticsearch-bboss
v5.9.2 Improvements:
1. Increase MetaMap categories: MetaMap inherit the HashMap, the increase of the attribute map information related meta metadata Reference Example:
//创建批量创建文档的客户端对象,单实例多线程安全
ClientInterface clientUtil = ElasticSearchHelper.getRestClientUtil();
//单文档检索
MetaMap newDemo = clientUtil.getDocument("demo",//索引表
"demo",//索引类型
"1",//文档id
MetaMap.class
);
//打印metamap和返回的文档元数据信息
System.out.println(newDemo);
System.out.println("getId:"+newDemo.getId());
System.out.println("getIndex:"+newDemo.getIndex());
System.out.println("getNode:"+newDemo.getNode());
System.out.println("getShard:"+newDemo.getShard());
System.out.println("getType:"+newDemo.getType());
System.out.println("getExplanation:"+newDemo.getExplanation());
System.out.println("getFields:"+newDemo.getFields());
System.out.println("getHighlight:"+newDemo.getHighlight());
System.out.println("getInnerHits:"+newDemo.getInnerHits());
System.out.println("getNested:"+newDemo.getNested());
System.out.println("getPrimaryTerm:"+newDemo.getPrimaryTerm());
System.out.println("getScore:"+newDemo.getScore());
System.out.println("getSeqNo:"+newDemo.getSeqNo());
System.out.println("getVersion:"+newDemo.getVersion());
System.out.println("getParent:"+newDemo.getParent());
System.out.println("getRouting:"+newDemo.getRouting());
System.out.println("getSort:"+newDemo.getSort());
System.out.println("isFound:"+newDemo.isFound());
//列表检索
ESDatas<MetaMap> data //ESDatas为查询结果集对象,封装了返回的当前查询的List<TAgentInfo>结果集和符合条件的总记录数totalSize
= clientUtil.searchList("trace-*/_search",//查询操作,查询indices trace-*中符合条件的数据
"queryServiceByCondition",//通过名称引用配置文件中的query dsl语句
parmas,//查询条件,Map<key,value>
MetaMap.class);//指定返回的po对象类型,po对象中的属性与indices表中的文档filed名称保持一致
//获取结果对象列表
List<MetaMap> demos = data.getDatas();
//获取总记录数
long totalSize = data.getTotalSize();
2. Fix custom boot client issues: setting numerical parameters and boolean parameter does not work
3. Data Synchronization Tool: Increase mongodb to elasticsearch synchronization, tools demo:
https://github.com/bbossgroups/mongodb-elasticsearch
Reference Document: MongoDB-use data synchronization elasticsearch
4. Improved Data Synchronization tool: If the sync field contains the name of the _id attribute, then ignored it, otherwise it will cause data can not be imported properly Elasticsearch
The slow increase in information service call request log collection function, slow dsl can be printed to the log file, or transmitted to the receiving interface function callback slow dsl
Two additional parameters:
elasticsearch.slowDslThreshold (dsl slow time condition parameter) and elasticsearch.slowDslCallback (slow dsl receiving interface configuration)
slowDslThreshold unit: ms ms
elasticsearch.slowDslThreshold=10000
spring boot configuration items
spring.elasticsearch.bboss.elasticsearch.slowDslThreshold=10000
Slow dsl designated to receive callback interface function slowDslCallback, to facilitate processing of information on their own slow dsl
public interface SlowDslCallback {
void slowDslHandle( SlowDsl slowDsl);
}
slowDslCallback configuration:
elasticsearch.slowDslCallback=org.bboss.elasticsearchtest.crud.TestSlowDslCallback
spring boot configuration items
spring.elasticsearch.bboss.elasticsearch.slowDslCallback=org.bboss.elasticsearchtest.crud.TestSlowDslCallback
If you do not specify a callback handler interface directly print a warning message to the log file, WARN level, if dsl too long, need to intercept and then print out some content to the log file: More than 2048 dsl will be intercepted over the content out, replaced ..... or the call SlowDslCallback interface methods slowDslHandle pass information of slow dsl:
6. Data Synchronization Tool Improvements: complete incremental data synchronization, incremental field can be achieved without having to sort incremental synchronization function, synchronization to enhance performance, improve rear classification (such as Context) package path has been adjusted, but the api is fully compatible, you can go to the following address after downloading the latest tools to improve:
-
jdk timer and quartz demo project https://github.com/bbossgroups/db-elasticsearch-tool
-
xxl-job demo project https://github.com/bbossgroups/db-elasticsearch-xxjob
7. Data Synchronization Tool bug fixes: Addressing incremental synchronization status update is not correct problems that may exist
8. Data Synchronization tool improvements: increased collect data synchronization monitoring indicator data, reference documentation: a data synchronization task execution statistics acquisition
9. New Data Synchronization Tool: elasticsearch db to data synchronization, the total amount of support, the incremental timing synchronization, synchronization jdk timer built supports quartz, xxl-job scheduling engine, Reference:
elasticsearch-db data synchronization method used
10. The data synchronization simplify debugging program development: synchronization may be performed directly in the development and debugging method of synchronizing the main program
11.Scroll / Slice scroll search function improvements: support the implementation of the interrupt scroll / slice croll in hanlder result callback handler, refer to the document:
https://esdoc.bbossgroups.com/#/Scroll-SliceScroll-api
12.json library fastjackson upgraded to 2.10.0
Elasticsearch bboss use documents
Elasticsearch bboss version change history