All Projects → mbuhot → Eskotlin

mbuhot / Eskotlin

Licence: mit
Elasticsearch Query DSL for Kotlin

Programming Languages

kotlin
9241 projects
dsl
153 projects

Projects that are alternatives of or similar to Eskotlin

Flink Learning
flink learning blog. http://www.54tianzhisheng.cn/ 含 Flink 入门、概念、原理、实战、性能调优、源码解析等内容。涉及 Flink Connector、Metrics、Library、DataStream API、Table API & SQL 等内容的学习案例,还有 Flink 落地应用的大型项目案例(PVUV、日志存储、百亿数据实时去重、监控告警)分享。欢迎大家支持我的专栏《大数据实时计算引擎 Flink 实战与性能优化》
Stars: ✭ 11,378 (+9793.91%)
Mutual labels:  elasticsearch
Spring Boot Examples
🥗​ Spring/SpringBoot/SpringCloud 实践学习案例,从入门到精通,持续更新中,欢迎交流学习🍺 !
Stars: ✭ 110 (-4.35%)
Mutual labels:  elasticsearch
Ik Analyzer
支持Lucene5/6/7/8+版本, 长期维护。
Stars: ✭ 112 (-2.61%)
Mutual labels:  elasticsearch
Mall
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
Stars: ✭ 54,797 (+47549.57%)
Mutual labels:  elasticsearch
Blog
我的日记
Stars: ✭ 110 (-4.35%)
Mutual labels:  elasticsearch
Recogito2
Semantic Annotation Without the Pointy Brackets
Stars: ✭ 110 (-4.35%)
Mutual labels:  elasticsearch
Search Guard Kibana Plugin
This plugin for Kibana adds session management and multi tenancy to a Search Guard secured cluster.
Stars: ✭ 107 (-6.96%)
Mutual labels:  elasticsearch
Microservice Monitoring
Monitor your Spring Boot application with the Elastic Stack all around
Stars: ✭ 114 (-0.87%)
Mutual labels:  elasticsearch
Elasticsearch Analysis Kuromoji Ipadic Neologd
Elasticsearch's Analyzer for Kuromoji with Neologd
Stars: ✭ 109 (-5.22%)
Mutual labels:  elasticsearch
Elastalert Wechat Plugin
elastalert微信企业号报警插件
Stars: ✭ 112 (-2.61%)
Mutual labels:  elasticsearch
Elasticambari
Elastic Service for Ambari
Stars: ✭ 108 (-6.09%)
Mutual labels:  elasticsearch
Log4j2 Elasticsearch
Log4j2 Elasticsearch Appender plugins
Stars: ✭ 107 (-6.96%)
Mutual labels:  elasticsearch
Docker offensive elk
Elasticsearch for Offensive Security
Stars: ✭ 112 (-2.61%)
Mutual labels:  elasticsearch
Grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
Stars: ✭ 45,930 (+39839.13%)
Mutual labels:  elasticsearch
Searchbox
Lightweight and performance oriented search box UI component libraries for React, Vue, React Native, JS and Android
Stars: ✭ 114 (-0.87%)
Mutual labels:  elasticsearch
Twint
An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
Stars: ✭ 12,102 (+10423.48%)
Mutual labels:  elasticsearch
Searchkit Starter App
Searchkit starter app. Based off create-react-app
Stars: ✭ 110 (-4.35%)
Mutual labels:  elasticsearch
Redelk
Red Team's SIEM - tool for Red Teams used for tracking and alarming about Blue Team activities as well as better usability in long term operations.
Stars: ✭ 1,692 (+1371.3%)
Mutual labels:  elasticsearch
Ventas
Clojure ecommerce platform
Stars: ✭ 114 (-0.87%)
Mutual labels:  elasticsearch
Aws Lambda Es Cleanup
AWS Elasticsearch Lambda Curator
Stars: ✭ 112 (-2.61%)
Mutual labels:  elasticsearch

Build Status

ES Kotlin

Elasticsearch Query DSL for Kotlin.

This library aims to minimize the gap between the Elasticsearch JSON query DSL, and the API used when writing kotlin applications. This integrates with the existing java API, only providing a nicer syntax to build the queries.

Getting Started

Gradle

repositories {
    mavenCentral()
    ...
    maven {
        url  "http://dl.bintray.com/mbuhot/maven"
   }
}
dependencies {
    compile 'mbuhot:eskotlin:0.7.0'
    ...
}

See CHANGELOG for older versions supporting previous elasticsearch client versions.

Maven

Full details on bintray

<dependency>
  <groupId>mbuhot</groupId>
  <artifactId>eskotlin</artifactId>
  <version>0.7.0</version>
  <type>pom</type>
</dependency>

Examples

Term Query

JSON:

{
    "term" : { "user" : "Kimchy" }
}

Kotlin:

val query = term {
    "user" to "Kimchy"
}

Bool Query

JSON:

{
    "bool" : {
        "must" : {
            "term" : { "user" : "kimchy" }
        },
        "filter": {
            "term" : { "tag" : "tech" }
        },
        "must_not" : {
            "range" : {
                "age" : { "from" : 10, "to" : 20 }
            }
        },
        "should" : [
            {
                "term" : { "tag" : "wow" }
            },
            {
                "term" : { "tag" : "elasticsearch" }
            }
        ],
        "minimum_should_match" : 1,
        "boost" : 1.0
    }
}

Kotlin:

val query = bool {
    must {
        term { "user" to "kimchy" }
    }
    filter {
        term { "tag" to "tech" }
    }
    must_not {
        range {
            "age" {
                from = 10
                to = 20
            }
        }
    }
    should = listOf(
        term { "tag" to "wow" },
        term { "tag" to "elasticsearch" })
    minimum_should_match = 1
    boost = 1.0f
}

Function Score Query

JSON:

{
    "function_score": {
        "query": {
            "match_all": {}
        },
        "functions": [
            {
                "filter": {
                    "term": {
                        "foo": "bar"
                    }
                },
                "gauss": {
                    "baz": {
                        "scale": 1.0
                    }
                }
            },
            {
                "filter": {
                    "match_all": {}
                },
                "random_score": {
                    "seed": 234
                }
            },
            {
                "exp": {
                    "qux": {
                        "scale": 2.3
                    }
                }
            }
        ],
        "score_mode": "max",
        "boost_mode": "multiply",
        "max_boost": 5.0,
        "boost": 1.2,
        "min_score": 0.001
    }
}

Kotlin:

val query = function_score {
    query = match_all { }
    functions = listOf(
        term { "foo" to "bar" } to gaussDecayFunction("baz", 1.0),
        match_all { } to randomFunction(234L),
        null to exponentialDecayFunction("qux", 2.3))

    boost = 1.2f
    boost_mode = "multiply"
    score_mode = "max"
    max_boost = 5.0f
    min_score = 0.001f
}

See the src/test directory for more examples.

API Coverage

Full Text Queries - Done

Term Queries - Done

Compound Queries - Done

Joining Queries - Done

Geo Queries - Contributions welcome!

  • Geo Shape
  • Geo Bounding Box
  • Geo Distance Range
  • Geo Polygon
  • Geohash Cell

Specialized Queries - Contributions welcome!

  • More Like This
  • Template
  • Script

Span Queries - Contributions welcome!

  • Span Term
  • Span Multi Term
  • Span First
  • Span Near
  • Span Or
  • Span Not
  • Span Containing
  • Span Within

Aggregations - Contributions welcome!

  • Nested
  • Filter
  • Metrics Aggregations
  • Bucket Aggregations
  • Pipeline Aggregations
  • Matrix Aggregations

License

MIT - See LICENSE file for full text.

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].