Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Generic SQL to Elasticsearch DSL query translator

License

NotificationsYou must be signed in to change notification settings

QXIP/elasql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic SQL to Elasticsearch DSL query translator. Designed forSENTINL

Status

  • Experimental - Join us hacking this!

Installation

npm install elasql

Usage

const convert = require('elasql').convertconvert('SELECT id,name FROM shop WHERE shop_id BETWEEN 5 AND 10 AND type = "cat"')
Output
{  "query": {    "bool": {      "must": [        {          "match": {            "type": "cat"          }        }      ],      "must_not": [],      "filter": [        {          "range": {            "shop_id": {              "gte": {                "type": "number",                "value": 5              },              "lte": {                "type": "number",                "value": 10              }            }          }        }      ]    }  },  "aggregations": {    "id": {      "terms": {        "field": "id"      },      "aggregations": {        "name": {          "terms": {            "field": "name"          }        }      }    }  }}

License

(C) QXIP BV 2018, released under the MIT License

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp