1. <i id='cOYbd'><tr id='cOYbd'><dt id='cOYbd'><q id='cOYbd'><span id='cOYbd'><b id='cOYbd'><form id='cOYbd'><ins id='cOYbd'></ins><ul id='cOYbd'></ul><sub id='cOYbd'></sub></form><legend id='cOYbd'></legend><bdo id='cOYbd'><pre id='cOYbd'><center id='cOYbd'></center></pre></bdo></b><th id='cOYbd'></th></span></q></dt></tr></i><div id='cOYbd'><tfoot id='cOYbd'></tfoot><dl id='cOYbd'><fieldset id='cOYbd'></fieldset></dl></div>
      <legend id='cOYbd'><style id='cOYbd'><dir id='cOYbd'><q id='cOYbd'></q></dir></style></legend>

      <small id='cOYbd'></small><noframes id='cOYbd'>

    2. <tfoot id='cOYbd'></tfoot>
        <bdo id='cOYbd'></bdo><ul id='cOYbd'></ul>

      SQL查询自动转换为ElasticSearch查询

      Automatic conversion of SQL query to ElasticSearch Query(SQL查询自动转换为ElasticSearch查询)
      <tfoot id='s7zVn'></tfoot>
        <tbody id='s7zVn'></tbody>
      • <i id='s7zVn'><tr id='s7zVn'><dt id='s7zVn'><q id='s7zVn'><span id='s7zVn'><b id='s7zVn'><form id='s7zVn'><ins id='s7zVn'></ins><ul id='s7zVn'></ul><sub id='s7zVn'></sub></form><legend id='s7zVn'></legend><bdo id='s7zVn'><pre id='s7zVn'><center id='s7zVn'></center></pre></bdo></b><th id='s7zVn'></th></span></q></dt></tr></i><div id='s7zVn'><tfoot id='s7zVn'></tfoot><dl id='s7zVn'><fieldset id='s7zVn'></fieldset></dl></div>

        • <small id='s7zVn'></small><noframes id='s7zVn'>

              <legend id='s7zVn'><style id='s7zVn'><dir id='s7zVn'><q id='s7zVn'></q></dir></style></legend>
              • <bdo id='s7zVn'></bdo><ul id='s7zVn'></ul>
                本文介绍了SQL查询自动转换为ElasticSearch查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一项服务,目前将数据存储在 Oracle DB 中.我正在做一个项目,我需要运行一组 sql 查询来获取一些聚合数据.我想将这些查询存储在一个地方,我可以对其进行迭代并获取所需的数据.比如说,我今天有 10 个查询.但是,我可以继续添加更多内容,而无需修改代码.

                I have a service which currently stores data in Oracle DB. I am working on a project where I need to run a set of sql queries to get some aggregated data. I would want to store these queries at one place, which I can iterate over, and get the required data. Say, I have 10 queries today. But, I can keep adding more, without toching the code.

                但是,明天我们想切换到 ElasticSearch.有没有办法,我可以使用相同的 sql 查询来搜索甚至 ElasticSearch.

                But, tomorrow we would want to switch to ElasticSearch. Is there a way, that i can use the same sql queries to search through even ElasticSearch.

                推荐答案

                With Elasticsearch 6.3 于 2018 年 6 月发布,您可能不再需要自动转换".

                With Elasticsearch 6.3 released in June 2018, you might not need an "automatic conversion" anymore.

                6.3 版本带有原生 SQL 支持!(目前仍处于试验阶段)

                The 6.3 release comes with native SQL support! (still experimental for now)

                你(或你认识的人)有没有:

                Have you (or someone you know) ever:

                • 我知道如何在 SQL 语句中做这件事——我如何在 Elasticsearch 中做同样的事情?"
                • 尝试使用标记化来构建全文搜索a>、词干提取同义词相关性排序在 SQL 引擎(如关系数据库)之上?
                • 是否尝试将传统数据库扩展到数十亿行?
                • 是否尝试将 BI 系统等 3rd 方工具连接到 Elasticsearch?

                这些都是我们希望能够进入新的 Elasticsearch SQL 版本的东西.

                These are all things which we hope we can make inroads into our new Elasticsearch SQL release.

                我们希望让开发人员、数据科学家和其他熟悉 SQL 语言的人——但目前还不熟悉或无法使用 Elasticsearch 查询语言——使用速度、可扩展性和全文Elasticsearch 提供的强大功能以及其他人已经逐渐了解和喜爱的功能.

                Our hope is to allow developers, data scientists, and others that are familiar with the SQL language -- but so far unfamiliar with or unable to use the Elasticsearch query language -- to use the speed, scalability, and full-text power that Elasticsearch offers and others have grown to know and love.

                如果您刚刚开始使用此功能或为其提供支持的 Elasticsearch 的强大功能,请尝试以下几点:

                If you’re just getting started using this functionality or the power of Elasticsearch that powers it, here are a few things to try:

                • SELECT ... ORDER BY SCORE() DESC 能够根据搜索结果的相关性进行排序
                • 通过使用 MATCH 运算符(如 SELECT ... WHERE MATCH(fieldname, 'some text')
                • 获得从标记化到词干的所有全文魔法>
                • 使用我们的 JDBC 驱动程序将您最喜欢的 JDBC 兼容工具连接到 Elasticsearch
                • 通过翻译 API 翻译您知道的 SQL 查询,了解如何使用 Elasticsearch DSL 的全部功能
                • SELECT … ORDER BY SCORE() DESC to be able to sort by the relevance of the search results
                • Get all of the full-text magic from tokenization to stemming by using the MATCH operator like SELECT … WHERE MATCH(fieldname, 'some text')
                • Connect your favorite JDBC-compatible tool to Elasticsearch with our JDBC driver
                • Learn how to use the full power of the Elasticsearch DSL by translating a SQL query you know via the translate API

                请注意,此功能在 Elasticsearch 和 REST API 的默认"(非 OSS 专用)发行版中可用——包括翻译"功能和 CLI 工具是完全免费的.

                Note that this feature is made available in the "default" (non-OSS-only) distribution of Elasticsearch and the REST API -- including the "translate" functionality and the CLI tool are completely free.

                这篇关于SQL查询自动转换为ElasticSearch查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Building a comma separated list?(建立一个逗号分隔的列表?)
                Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                How to update a record using sequelize for node?(如何使用节点的 sequelize 更新记录?)
                How to provide a mysql database connection in single file in nodejs(如何在 nodejs 中的单个文件中提供 mysql 数据库连接)
                Defining a one-to-one relationship in SQL Server(在 SQL Server 中定义一对一关系)
                Looping Over Result Sets in MySQL(在 MySQL 中循环结果集)
              • <legend id='IcgCc'><style id='IcgCc'><dir id='IcgCc'><q id='IcgCc'></q></dir></style></legend>
                  <tbody id='IcgCc'></tbody>

                  • <tfoot id='IcgCc'></tfoot>
                  • <i id='IcgCc'><tr id='IcgCc'><dt id='IcgCc'><q id='IcgCc'><span id='IcgCc'><b id='IcgCc'><form id='IcgCc'><ins id='IcgCc'></ins><ul id='IcgCc'></ul><sub id='IcgCc'></sub></form><legend id='IcgCc'></legend><bdo id='IcgCc'><pre id='IcgCc'><center id='IcgCc'></center></pre></bdo></b><th id='IcgCc'></th></span></q></dt></tr></i><div id='IcgCc'><tfoot id='IcgCc'></tfoot><dl id='IcgCc'><fieldset id='IcgCc'></fieldset></dl></div>

                      <small id='IcgCc'></small><noframes id='IcgCc'>

                        • <bdo id='IcgCc'></bdo><ul id='IcgCc'></ul>