All Projects → xpc1024 → easy-es

xpc1024 / easy-es

Licence: Apache-2.0 License
Better Elastic Search search engine framework, the bottom layer adopts RestHighLevelClient, API design consistent with Mybatis-plus, zero additional learning cost, shielding language differences, developers only need to know MySQL syntax to complete Es-related operations, both Low code, easy to use, easy to expand and other features, support Es …

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to easy-es

Dapper.lnskydb
基于Dapper的LINQ扩展,支持Lambda表达式,支持按时间分库分表,也可以自定义分库分表方法,且实体类有T4模版自动生成.省去手写实体类的麻烦。已在实际项目使用
Stars: ✭ 228 (+4.59%)
Mutual labels:  orm
Sqlhelper
SQL Tools ( Dialect, Pagination, DDL dump, UrlParser, SqlStatementParser, WallFilter, BatchExecutor for Test) based Java. it is easy to integration into any ORM frameworks
Stars: ✭ 242 (+11.01%)
Mutual labels:  orm
Mikro Orm
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases.
Stars: ✭ 3,874 (+1677.06%)
Mutual labels:  orm
Quickperf
QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
Stars: ✭ 231 (+5.96%)
Mutual labels:  orm
Sparrow
A simple database toolkit for PHP
Stars: ✭ 236 (+8.26%)
Mutual labels:  orm
Odmantic
Async ODM (Object Document Mapper) for MongoDB based on python type hints
Stars: ✭ 240 (+10.09%)
Mutual labels:  orm
Spring Data Jpa Entity Graph
Spring Data JPA extension allowing full dynamic usage of EntityGraph on repositories
Stars: ✭ 221 (+1.38%)
Mutual labels:  orm
es-mvc
ESMVC 旨在方便 ElasticSearch 的使用,就行访问数据库一样访问ES,提供了方便的 service, mapper 层。底层支持 TransportClient, RestHighLevelClient 。
Stars: ✭ 20 (-90.83%)
Mutual labels:  resthighlevelclient
Granite
ORM Model with Adapters for mysql, pg, sqlite in the Crystal Language.
Stars: ✭ 238 (+9.17%)
Mutual labels:  orm
Database
💾 A database layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.
Stars: ✭ 251 (+15.14%)
Mutual labels:  orm
Gosql
🐥The very simple ORM library for Golang
Stars: ✭ 233 (+6.88%)
Mutual labels:  orm
Cphalcon7
Dao7 - Web framework for PHP7.x,项目接洽 QQ 176013762
Stars: ✭ 237 (+8.72%)
Mutual labels:  orm
Python For Entrepreneurs Course Demos
Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
Stars: ✭ 247 (+13.3%)
Mutual labels:  orm
Pony
Pony Object Relational Mapper
Stars: ✭ 2,762 (+1166.97%)
Mutual labels:  orm
Xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server
Stars: ✭ 2,974 (+1264.22%)
Mutual labels:  orm
Db
Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
Stars: ✭ 2,832 (+1199.08%)
Mutual labels:  orm
Data
ATK Data - Data Access Framework for high-latency databases (Cloud SQL/NoSQL).
Stars: ✭ 243 (+11.47%)
Mutual labels:  orm
awesome-go-orms
ORMs for Go, most starred on Github.
Stars: ✭ 206 (-5.5%)
Mutual labels:  orm
Django
The Web framework for perfectionists with deadlines.
Stars: ✭ 61,277 (+28008.72%)
Mutual labels:  orm
Freesql
🦄 .NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, Click house orm, MsAccess orm.
Stars: ✭ 3,077 (+1311.47%)
Mutual labels:  orm

East-Es-Logo

Born To Simplify Development

maven code style

What is Easy-Es?

Easy-Es is a powerfully enhanced toolkit of RestHighLevelClient for simplify development. This toolkit provides some efficient, useful, out-of-the-box features for ElasticSearch. By using Easy-Es, you can use MySQL syntax to complete Es queries. Use it can effectively save your development time.

Official website

https://easy-es.cn/#/en/

Links

Features

  • Auto configuration on startup
  • Out-of-the-box interfaces for operate es
  • Powerful and flexible where condition wrapper
  • Lambda-style API
  • Automatic paging operation
  • Support high-level syntax such as highlighting and weighting and Geo etc
  • ...

Compare

Demand: Query all documents with title equals "Hi" and author equals "Guy"

// Use Easy-Es to complete the query with only 3 lines of code
LambdaEsQueryWrapper<Document> wrapper = new LambdaEsQueryWrapper<>();
wrapper.eq(Document::getTitle, "Hi").eq(Document::getCreator, "Guy");
List<Document> documents = documentMapper.selectList(wrapper);
// Query with RestHighLevelClient requires 11 lines of code, not including parsing JSON code
String indexName = "document";
SearchRequest searchRequest = new SearchRequest(indexName);
BoolQueryBuilder boolQueryBuilder = QueryBuilders.boolQuery();
TermQueryBuilder titleTerm = QueryBuilders.termQuery("title", "Hi");
TermsQueryBuilder creatorTerm = QueryBuilders.termsQuery("creator", "Guy");
boolQueryBuilder.must(titleTerm);
boolQueryBuilder.must(creatorTerm);
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(boolQueryBuilder);
searchRequest.source(searchSourceBuilder);
try {
    SearchResponse searchResponse = restHighLevelClient.search(searchRequest, RequestOptions.DEFAULT);
    // Then parse the DocumentList from searchResponse in various ways, omitting these codes...
    } catch (IOException e) {
            e.printStackTrace();
    }

The above is just a simple query demonstration. The more complex the actual query scene, the better the effect, which can save 3-5 times the amount of code on average.

Getting started

  • Add Easy-Es dependency

    • Latest Version: Maven Central
    • Maven:
      <dependency>
        <groupId>io.github.xpc1024</groupId>
        <artifactId>easy-es-boot-starter</artifactId>
        <version>Latest Version</version>
      </dependency>
    • Gradle
      compile group: 'io.github.xpc1024', name: 'easy-es-boot-starter', version: 'Latest Version'
  • Add mapper file extends BaseEsMapper interface

    public interface DocumentMapper extends BaseMapper<Document> {
    }
  • Use it

    LambdaEsQueryWrapper<Document> wrapper = new LambdaEsQueryWrapper<>();
    wrapper.eq(Document::getTitle,"Hello World")
           .eq(Document::getCreator,"Guy");
    List<Document> documentList = documentMapper.selectList();
    

    Easy-Es will execute the following Query:

    {"query":{"bool":{"must":[{"term":{"title":{"value":"Hello World","boost":1.0}}},{"term":{"creator":{"value":"Guy","boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}}

    The syntax of this query in MySQL is:

     SELECT * FROM document WHERE title = 'Hello World' AND creator = 'Guy'

This showcase is just a small part of Easy-Es features. If you want to learn more, please refer to the documentation.

SUPPORT

In the early stage of project promotion, I hope everyone can give a little bit of three links: Star, 👀Watch, fork📌, support the spirit of open source, let more people see and use this project, thank you very much!

Syntax comparison with MySQL

MySQL Easy-Es
and and
or or
= eq
!= ne
> gt
>= ge
< lt
<= le
like '%field%' like
not like '%field%' notLike
like '%field' likeLeft
like 'field%' likeRight
between between
notBetween notBetween
is null isNull
is notNull isNotNull
in in
not in notIn
group by groupBy
order by orderBy
min min
max max
avg avg
sum sum
sum sum
- orderByAsc
- orderByDesc
- match
- highLight
... ...

Donate

Donate Easy-Es

License

Easy-Es is under the Apache 2.0 license. See the Apache License 2.0 file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].