Coder Social home page Coder Social logo

synpore / elasticsearch-sql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from noobgod/elasticsearch-sql

0.0 1.0 0.0 69 KB

通过 SQL 查询 elasticsearch:集成插件elasticsearch-sql,封装查询API提供Restful接口,直接将字符串sql作为参数就可以得到json对象形式的返回结果。

License: Apache License 2.0

Java 100.00%

elasticsearch-sql's Introduction

elasticsearch-sql

通过 SQL 查询 elasticsearch,快捷简单。

本项目主要依赖 elasticsearch-sql插件。

简介

本项目是在 Elasticsearch 5.6.0的基础上搭建的,如果你使用的 ES 不是该版本,API可能会有一些变化,可以自己修改下。

配置

在配置文件中需要如下的配置,修改为你自己的ES地址,如果是集群的形式,以逗号分隔即可。

server.port=8080
#elasticSearch 配置
elasticSearch.host=localhost:9200
elasticSearch.sql.host=localhost:9300
elasticSearch.maxRetryTimeout=10000
elasticSearch.httpScheme=http

主要接口

项目中提供了三个接口,具体内容在类ElasticSearchController中。

1.通过 API 的方式查询

http://localhost:8080/es/data/search

2.通过 JDBC 的方式查询

http://localhost:8080/es/data/query

2.expain sql,将SQL解释成DSL语言

http://localhost:8080/es/data/expain

elasticsearch-sql's People

Contributors

noobgod avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.