Java查询es用sql_lasticsearch-SQL:使用SQL查询Elasticsearch

IMPORTANT

Since 7.5.0.0, the path /_sql is changed to /_nlpcn/sql, and the path /_sql/_explain is changed to /_nlpcn/sql/explain.

DEPRECATED

Please note, this project is no longer in active development, and is deprecated, please use official version x-pack-sql and OpenDistro for Elasticsearch SQL supported by AWS and licensed under Apache 2.

Elasticsearch-SQL

build status

1.7.6 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963312e78 2.0.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e30 2.1.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e31 2.1.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e312e31 2.1.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e312e32 2.2.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e322e30

2.2.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e322e31 2.3.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e30 2.3.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e31 2.3.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e32 2.3.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e33 2.3.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e34

2.3.5 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e332e35 2.4.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e30 2.4.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e31 2.4.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e32 2.4.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e33 2.4.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e34

2.4.5 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e35 2.4.6 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963322e342e36 5.0.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e302e31 5.1.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e312e31 5.1.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e312e32 5.2.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e322e30

5.2.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e322e31 5.2.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e322e32 5.3.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e332e30 5.3.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e332e31 5.3.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e332e32 5.3.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e332e33

5.4.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e342e30 5.4.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e342e31 5.4.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e342e32 5.4.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e342e33 5.5.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e352e30 5.5.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e352e31

5.5.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e352e32 5.5.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e352e33 5.6.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e30 5.6.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e31 5.6.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e32 5.6.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e33

5.6.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e34 5.6.5 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e35 5.6.6 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e36 5.6.7 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e37 5.6.8 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e38 5.6.9 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e39

5.6.10 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3130 5.6.11 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3131 5.6.12 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3132 5.6.13 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3133 5.6.14 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3134 5.6.15 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3135

5.6.16 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963352e362e3136 6.0.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e302e30 6.0.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e302e31 6.1.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e312e30 6.1.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e312e31 6.1.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e312e32

6.1.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e312e33 6.1.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e312e34 6.2.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e322e30 6.2.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e322e31 6.2.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e322e32 6.2.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e322e33

6.2.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e322e34 6.3.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e332e30 6.3.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e332e31 6.3.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e332e32 6.4.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e342e30 6.4.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e342e31

6.4.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e342e32 6.4.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e342e33 6.5.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e352e30 6.5.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e352e31 6.5.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e352e32 6.5.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e352e33

6.5.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e352e34 6.6.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e362e30 6.6.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e362e31 6.6.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e362e32 6.7.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e372e30 6.7.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e372e31

6.7.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e372e32 6.8.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e30 6.8.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e31 6.8.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e32 6.8.3 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e33 6.8.4 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e34

6.8.5 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e35 6.8.6 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963362e382e36 7.0.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e302e30 7.0.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e302e31 7.1.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e312e30 7.1.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e312e31

7.2.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e322e30 7.2.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e322e31 7.3.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e332e30 7.3.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e332e31 7.3.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e332e32 7.4.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e342e30

7.4.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e342e31 7.4.2 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e342e32 7.5.0 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e352e30 7.5.1 68747470733a2f2f7472617669732d63692e6f72672f4e4c506368696e612f656c61737469637365617263682d73716c2e7376673f6272616e63683d656c6173746963372e352e31

Query elasticsearch using familiar SQL syntax. You can also use ES functions in SQL.

Check out our wiki!

explain example

you can visite : http://essql.nlpcn.org/ , it is a sample example for explain

Web frontend overview

db23a84aa59d053355a2cf06bcf7a43f.png

SETUP

Install as plugin: Versions

elasticsearch version

latest version

remarks

branch

1.x

1.7.6

tested against elastic 1.7.6

elastic1.x

2.0.0

2.0.4

delete commands not supported

elastic2.0

2.1.0

2.1.0.2

delete commands not supported

elastic2.1

2.1.1

2.1.1.1

delete commands not supported

elastic2.1.1

2.1.2

2.1.2.0

delete commands not supported

elastic2.1.2

2.2.0

2.2.0.1

delete commands not supported

elastic2.2.0

2.2.1

2.2.1.0

delete commands not supported

elastic2.2.1

2.3.0

2.3.0.0

delete commands not supported

elastic2.3.0

2.3.1

2.3.1.1

delete commands not supported

elastic2.3.1

2.3.2

2.3.2.0

delete commands not supported

elastic2.3.2

2.3.3

2.3.3.0

delete commands not supported

elastic2.3.3

2.3.4

2.3.4.0

delete commands not supported

elastic2.3.4

2.3.5

2.3.5.0

delete commands not supported

elastic2.3.5

2.4.0

2.4.0.1

delete commands not supported

elastic2.4.0

2.4.1

2.4.1.0

delete commands not supported

elastic2.4.1

2.4.2

2.4.2.1

delete commands not supported

elastic2.4.2

2.4.3

2.4.3.0

delete commands not supported

elastic2.4.3

2.4.4

2.4.4.0

delete commands not supported

elastic2.4.4

2.4.5

2.4.5.0

delete commands not supported

elastic2.4.5

2.4.6

2.4.6.0

delete commands not supported

elastic2.4.6

5.0.1

5.0.1.0

delete commands not supported

elastic5.0.1

5.1.1

5.1.1.0

delete commands not supported

elastic5.1.1

5.1.2

5.1.2.0

delete commands not supported

elastic5.1.2

5.2.0

5.2.0.0

delete commands not supported

elastic5.2.0

5.2.1

5.2.1.0

delete commands not supported

elastic5.2.1

5.2.2

5.2.2.0

delete commands not supported

elastic5.2.2

5.3.0

5.3.0.0

delete commands not supported

elastic5.3.0

5.3.1

5.3.1.0

delete commands not supported

elastic5.3.1

5.3.2

5.3.2.0

delete commands not supported

elastic5.3.2

5.3.3

5.3.3.0

delete commands not supported

elastic5.3.3

5.4.0

5.4.0.0

delete commands not supported

elastic5.4.0

5.4.1

5.4.1.0

delete commands not supported

elastic5.4.1

5.4.2

5.4.2.0

delete commands not supported

elastic5.4.2

5.4.3

5.4.3.0

delete commands not supported

elastic5.4.3

5.5.0

5.5.0.1

delete commands not supported

elastic5.5.0

5.5.1

5.5.1.0

delete commands not supported

elastic5.5.1

5.5.2

5.5.2.0

delete commands not supported

elastic5.5.2

5.5.3

5.5.3.0

delete commands not supported

elastic5.5.3

5.6.0

5.6.0.0

delete commands not supported

elastic5.6.0

5.6.1

5.6.1.0

delete commands not supported

elastic5.6.1

5.6.2

5.6.2.0

delete commands not supported

elastic5.6.2

5.6.3

5.6.3.0

delete commands not supported

elastic5.6.3

5.6.4

5.6.4.0

delete commands not supported

elastic5.6.4

5.6.5

5.6.5.0

delete commands not supported

elastic5.6.5

5.6.6

5.6.6.0

elastic5.6.6

5.6.7

5.6.7.0

elastic5.6.7

5.6.8

5.6.8.0

elastic5.6.8

5.6.9

5.6.9.0

elastic5.6.9

5.6.10

5.6.10.0

elastic5.6.10

5.6.11

5.6.11.0

elastic5.6.11

5.6.12

5.6.12.0

elastic5.6.12

5.6.13

5.6.13.0

elastic5.6.13

5.6.14

5.6.14.0

elastic5.6.14

5.6.15

5.6.15.0

elastic5.6.15

5.6.16

5.6.16.0

elastic5.6.16

6.0.0

6.0.0.0

elastic6.0.0

6.0.1

6.0.1.0

elastic6.0.1

6.1.0

6.1.0.0

elastic6.1.0

6.1.1

6.1.1.0

elastic6.1.1

6.1.2

6.1.2.0

elastic6.1.2

6.1.3

6.1.3.0

elastic6.1.3

6.1.4

6.1.4.0

elastic6.1.4

6.2.0

6.2.0.0

elastic6.2.0

6.2.1

6.2.1.0

elastic6.2.1

6.2.2

6.2.2.0

elastic6.2.2

6.2.3

6.2.3.0

elastic6.2.3

6.2.4

6.2.4.0

elastic6.2.4

6.3.0

6.3.0.0

elastic6.3.0

6.3.1

6.3.1.0

elastic6.3.1

6.3.2

6.3.2.0

elastic6.3.2

6.4.0

6.4.0.0

elastic6.4.0

6.4.1

6.4.1.0

elastic6.4.1

6.4.2

6.4.2.0

elastic6.4.2

6.4.3

6.4.3.0

elastic6.4.3

6.5.0

6.5.0.0

elastic6.5.0

6.5.1

6.5.1.0

elastic6.5.1

6.5.2

6.5.2.0

elastic6.5.2

6.5.3

6.5.3.0

elastic6.5.3

6.5.4

6.5.4.0

elastic6.5.4

6.6.0

6.6.0.0

elastic6.6.0

6.6.1

6.6.1.0

elastic6.6.1

6.6.2

6.6.2.0

elastic6.6.2

6.7.0

6.7.0.0

elastic6.7.0

6.7.1

6.7.1.0

elastic6.7.1

6.7.2

6.7.2.0

elastic6.7.2

6.8.0

6.8.0.0

elastic6.8.0

6.8.1

6.8.1.0

elastic6.8.1

6.8.2

6.8.2.0

elastic6.8.2

6.8.3

6.8.3.0

elastic6.8.3

6.8.4

6.8.4.0

elastic6.8.4

6.8.5

6.8.5.0

elastic6.8.5

6.8.6

6.8.6.0

elastic6.8.6

7.0.0

7.0.0.0

elastic7.0.0

7.0.1

7.0.1.0

elastic7.0.1

7.1.0

7.1.0.0

elastic7.1.0

7.1.1

7.1.1.0

elastic7.1.1

7.2.0

7.2.0.0

elastic7.2.0

7.2.1

7.2.1.0

elastic7.2.1

7.3.0

7.3.0.0

elastic7.3.0

7.3.1

7.3.1.0

elastic7.3.1

7.3.2

7.3.2.0

elastic7.3.2

7.4.0

7.4.0.0

elastic7.4.0

7.4.1

7.4.1.0

elastic7.4.1

7.4.2

7.4.2.0

elastic7.4.2

7.5.0

7.5.0.0

elastic7.5.0

7.5.1

7.5.1.0

elastic7.5.1

Elasticsearch 1.x

./bin/plugin -u https://github.com/NLPchina/elasticsearch-sql/releases/download/1.7.6/elasticsearch-sql-1.7.6.zip --install sql

Elasticsearch 2.0.0

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.0.4/elasticsearch-sql-2.0.4.zip

Elasticsearch 2.1.0

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.1.0.2/elasticsearch-sql-2.1.0.2.zip

Elasticsearch 2.1.1

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.1.1.1/elasticsearch-sql-2.1.1.1.zip

Elasticsearch 2.1.2

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.1.2.0/elasticsearch-sql-2.1.2.0.zip

Elasticsearch 2.2.0

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.2.0.1/elasticsearch-sql-2.2.0.1.zip

Elasticsearch 2.2.1

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.2.1.0/elasticsearch-sql-2.2.1.0.zip

Elasticsearch 2.3.0

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.0.0/elasticsearch-sql-2.3.0.0.zip

Elasticsearch 2.3.1

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.1.1/elasticsearch-sql-2.3.1.1.zip

Elasticsearch 2.3.2

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.2.0/elasticsearch-sql-2.3.2.0.zip

Elasticsearch 2.3.3

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.3.0/elasticsearch-sql-2.3.3.0.zip

Elasticsearch 2.3.4

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.4.0/elasticsearch-sql-2.3.4.0.zip

Elasticsearch 2.3.5

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.3.5.0/elasticsearch-sql-2.3.5.0.zip

Elasticsearch 2.4.0

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.0.1/elasticsearch-sql-2.4.0.1.zip

Elasticsearch 2.4.1

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.1.0/elasticsearch-sql-2.4.1.0.zip

Elasticsearch 2.4.2

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.2.1/elasticsearch-sql-2.4.2.1.zip

Elasticsearch 2.4.3

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.3.0/elasticsearch-sql-2.4.3.0.zip

Elasticsearch 2.4.4

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.4.0/elasticsearch-sql-2.4.4.0.zip

Elasticsearch 2.4.5

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.5.0/elasticsearch-sql-2.4.5.0.zip

Elasticsearch 2.4.6

./bin/plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/2.4.6.0/elasticsearch-sql-2.4.6.0.zip

Elasticsearch 5.0.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.0.1/elasticsearch-sql-5.0.1.0.zip

Elasticsearch 5.1.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.1.1.0/elasticsearch-sql-5.1.1.0.zip

Elasticsearch 5.1.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.1.2.0/elasticsearch-sql-5.1.2.0.zip

Elasticsearch 5.2.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.2.0.0/elasticsearch-sql-5.2.0.0.zip

Elasticsearch 5.2.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.2.1.0/elasticsearch-sql-5.2.1.0.zip

Elasticsearch 5.2.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.2.2.0/elasticsearch-sql-5.2.2.0.zip

Elasticsearch 5.3.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.3.0.0/elasticsearch-sql-5.3.0.0.zip

Elasticsearch 5.3.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.3.1.0/elasticsearch-sql-5.3.1.0.zip

Elasticsearch 5.3.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.3.2.0/elasticsearch-sql-5.3.2.0.zip

Elasticsearch 5.3.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.3.3.0/elasticsearch-sql-5.3.3.0.zip

Elasticsearch 5.4.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.0.0/elasticsearch-sql-5.4.0.0.zip

Elasticsearch 5.4.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.1.0/elasticsearch-sql-5.4.1.0.zip

Elasticsearch 5.4.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.2.0/elasticsearch-sql-5.4.2.0.zip

Elasticsearch 5.4.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.4.3.0/elasticsearch-sql-5.4.3.0.zip

Elasticsearch 5.5.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.5.0.0/elasticsearch-sql-5.5.0.1.zip

Elasticsearch 5.5.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.5.1.0/elasticsearch-sql-5.5.1.0.zip

Elasticsearch 5.5.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.5.2.0/elasticsearch-sql-5.5.2.0.zip

Elasticsearch 5.5.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.5.3.0/elasticsearch-sql-5.5.3.0.zip

Elasticsearch 5.6.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.0.0/elasticsearch-sql-5.6.0.0.zip

Elasticsearch 5.6.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.1.0/elasticsearch-sql-5.6.1.0.zip

Elasticsearch 5.6.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.2.0/elasticsearch-sql-5.6.2.0.zip

Elasticsearch 5.6.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.3.0/elasticsearch-sql-5.6.3.0.zip

Elasticsearch 5.6.4

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.4.0/elasticsearch-sql-5.6.4.0.zip

Elasticsearch 5.6.5

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.5.0/elasticsearch-sql-5.6.5.0.zip

Elasticsearch 5.6.6

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.6.0/elasticsearch-sql-5.6.6.0.zip

Elasticsearch 5.6.7

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.7.0/elasticsearch-sql-5.6.7.0.zip

Elasticsearch 5.6.8

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.8.0/elasticsearch-sql-5.6.8.0.zip

Elasticsearch 5.6.9

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.9.0/elasticsearch-sql-5.6.9.0.zip

Elasticsearch 5.6.10

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.10.0/elasticsearch-sql-5.6.10.0.zip

Elasticsearch 5.6.11

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.11.0/elasticsearch-sql-5.6.11.0.zip

Elasticsearch 5.6.12

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.12.0/elasticsearch-sql-5.6.12.0.zip

Elasticsearch 5.6.13

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.13.0/elasticsearch-sql-5.6.13.0.zip

Elasticsearch 5.6.14

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.14.0/elasticsearch-sql-5.6.14.0.zip

Elasticsearch 5.6.15

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.15.0/elasticsearch-sql-5.6.15.0.zip

Elasticsearch 5.6.16

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/5.6.16.0/elasticsearch-sql-5.6.16.0.zip

Elasticsearch 6.0.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.0.0.0/elasticsearch-sql-6.0.0.0.zip

Elasticsearch 6.0.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.0.1.0/elasticsearch-sql-6.0.1.0.zip

Elasticsearch 6.1.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.1.0.0/elasticsearch-sql-6.1.0.0.zip

Elasticsearch 6.1.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.1.1.0/elasticsearch-sql-6.1.1.0.zip

Elasticsearch 6.1.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.1.2.0/elasticsearch-sql-6.1.2.0.zip

Elasticsearch 6.1.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.1.3.0/elasticsearch-sql-6.1.3.0.zip

Elasticsearch 6.1.4

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.1.4.0/elasticsearch-sql-6.1.4.0.zip

Elasticsearch 6.2.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.0.0/elasticsearch-sql-6.2.0.0.zip

Elasticsearch 6.2.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.1.0/elasticsearch-sql-6.2.1.0.zip

Elasticsearch 6.2.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.2.0/elasticsearch-sql-6.2.2.0.zip

Elasticsearch 6.2.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.3.0/elasticsearch-sql-6.2.3.0.zip

Elasticsearch 6.2.4

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.2.4.0/elasticsearch-sql-6.2.4.0.zip

Elasticsearch 6.3.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.3.0.0/elasticsearch-sql-6.3.0.0.zip

Elasticsearch 6.3.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.3.1.0/elasticsearch-sql-6.3.1.1.zip

Elasticsearch 6.3.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.3.2.0/elasticsearch-sql-6.3.2.0.zip

Elasticsearch 6.4.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.4.0.0/elasticsearch-sql-6.4.0.0.zip

Elasticsearch 6.4.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.4.1.0/elasticsearch-sql-6.4.1.0.zip

Elasticsearch 6.4.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.4.2.0/elasticsearch-sql-6.4.2.0.zip

Elasticsearch 6.4.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.4.3.0/elasticsearch-sql-6.4.3.0.zip

Elasticsearch 6.5.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.0.0/elasticsearch-sql-6.5.0.0.zip

Elasticsearch 6.5.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.1.0/elasticsearch-sql-6.5.1.0.zip

Elasticsearch 6.5.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.2.0/elasticsearch-sql-6.5.2.0.zip

Elasticsearch 6.5.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.3.0/elasticsearch-sql-6.5.3.0.zip

Elasticsearch 6.5.4

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.5.4.0/elasticsearch-sql-6.5.4.0.zip

Elasticsearch 6.6.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.0.0/elasticsearch-sql-6.6.0.0.zip

Elasticsearch 6.6.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.1.0/elasticsearch-sql-6.6.1.0.zip

Elasticsearch 6.6.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.6.2.0/elasticsearch-sql-6.6.2.0.zip

Elasticsearch 6.7.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.7.0.0/elasticsearch-sql-6.7.0.0.zip

Elasticsearch 6.7.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.7.1.0/elasticsearch-sql-6.7.1.0.zip

Elasticsearch 6.7.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.7.2.0/elasticsearch-sql-6.7.2.0.zip

Elasticsearch 6.8.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.0.0/elasticsearch-sql-6.8.0.0.zip

Elasticsearch 6.8.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.1.0/elasticsearch-sql-6.8.1.0.zip

Elasticsearch 6.8.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.2.0/elasticsearch-sql-6.8.2.0.zip

Elasticsearch 6.8.3

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.3.0/elasticsearch-sql-6.8.3.0.zip

Elasticsearch 6.8.4

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.4.0/elasticsearch-sql-6.8.4.0.zip

Elasticsearch 6.8.5

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.5.0/elasticsearch-sql-6.8.5.0.zip

Elasticsearch 6.8.6

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/6.8.6.0/elasticsearch-sql-6.8.6.0.zip

Elasticsearch 7.0.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.0.0.0/elasticsearch-sql-7.0.0.0.zip

Elasticsearch 7.0.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.0.1.0/elasticsearch-sql-7.0.1.0.zip

Elasticsearch 7.1.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.1.0.0/elasticsearch-sql-7.1.0.0.zip

Elasticsearch 7.1.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.1.1.0/elasticsearch-sql-7.1.1.0.zip

Elasticsearch 7.2.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.2.0.0/elasticsearch-sql-7.2.0.0.zip

Elasticsearch 7.2.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.2.1.0/elasticsearch-sql-7.2.1.0.zip

Elasticsearch 7.3.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.3.0.0/elasticsearch-sql-7.3.0.0.zip

Elasticsearch 7.3.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.3.1.0/elasticsearch-sql-7.3.1.0.zip

Elasticsearch 7.3.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.3.2.0/elasticsearch-sql-7.3.2.0.zip

Elasticsearch 7.4.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.4.0.0/elasticsearch-sql-7.4.0.0.zip

Elasticsearch 7.4.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.4.1.0/elasticsearch-sql-7.4.1.0.zip

Elasticsearch 7.4.2

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.4.2.0/elasticsearch-sql-7.4.2.0.zip

Elasticsearch 7.5.0

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.5.0.0/elasticsearch-sql-7.5.0.0.zip

Elasticsearch 7.5.1

./bin/elasticsearch-plugin install https://github.com/NLPchina/elasticsearch-sql/releases/download/7.5.1.0/elasticsearch-sql-7.5.1.0.zip

After doing this, you need to restart the Elasticsearch server. Otherwise you may get errors like Invalid index name [sql], must not start with '']; ","status":400}.

Basic Usage

On elasticsearch 1.x / 2.x, visit the elasticsearch-sql web front-end:

http://localhost:9200/_plugin/sql/

On elasticsearch 5.x/6.x, use elasticsearch sql site chrome extension (make sure to enable cors on elasticsearch.yml). Alternatively, download and extract site, then start the web front-end like this:

cd site-server

npm install express --save

node node-server.js

Simple query

curl -X GET "localhost:9200/_nlpcn/sql" -H 'Content-Type: application/json' -d'select * from indexName limit 10'

Explain SQL to elasticsearch query DSL

curl -X GET "localhost:9200/_nlpcn/sql/explain" -H 'Content-Type: application/json' -d'select * from indexName limit 10'

SQL Usage

Query SELECT * FROM bank WHERE age >30 AND gender = 'm'

Aggregation select COUNT(*),SUM(age),MIN(age) as m, MAX(age),AVG(age)

FROM bank GROUP BY gender ORDER BY SUM(age), m DESC

Delete DELETE FROM bank WHERE age >30 AND gender = 'm'

Beyond SQL

Search SELECT address FROM bank WHERE address = matchQuery('880 Holmes Lane') ORDER BY _score DESC LIMIT 3

Aggregations

range age group 20-25,25-30,30-35,35-40 SELECT COUNT(age) FROM bank GROUP BY range(age, 20,25,30,35,40)

range date group by day SELECT online FROM online GROUP BY date_histogram(field='insert_time','interval'='1d')

range date group by your config SELECT online FROM online GROUP BY date_range(field='insert_time','format'='yyyy-MM-dd' ,'2014-08-18','2014-08-17','now-8d','now-7d','now-6d','now')

ES Geographic SELECT * FROM locations WHERE GEO_BOUNDING_BOX(fieldname,100.0,1.0,101,0.0)

Select type SELECT * FROM indexName/type

SQL Features

SQL Select

SQL Delete

SQL Where

can use "case when" in where clause

SQL Order By

can use "case when" in order by clause

SQL Group By

SQL AND & OR

SQL Like

SQL COUNT distinct

SQL In

SQL Between

SQL Aliases

SQL Not Null

SQL(ES) Date

SQL avg()

SQL count()

SQL last()

SQL max()

SQL min()

SQL sum()

SQL Nulls

SQL isnull()

SQL now()

SQL floor

SQL split

SQL trim

SQL log

SQL log10

SQL substring

SQL round

eg: round(10.135, 2) --> 10.14

SQL sqrt

SQL concat_ws

SQL union and minus

SQL case when

can use "in"、"not in" judge in case when clause

can execute simple calculation in case when clause, eg : case when 1 = 1 then field_1 + field_2 else 0 end

SQL if

select if(sex='1','男','女') from t_user;

SQL limit

can set aggregation bucket size and shard size by setting limit, shardSize = 20 * bucketSize

eg: select city,count(*) as user_count from t_user group by city limit 100;

on the above example, the bucket size is 100, shard size is 20*100 = 2000

JDBC Support (Experimental feature)

Check details : JDBC Support

Beyond sql features

ES TopHits

ES MISSING

ES STATS

ES GEO_INTERSECTS

ES GEO_BOUNDING_BOX

ES GEO_DISTANCE

ES GEOHASH_GRID aggregation

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值