From 99f503e3bea5c289907ff16b438875ecf2a8f2a2 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Fri, 22 Jun 2018 00:16:03 +0300 Subject: [PATCH] [DOCS] Fix REST tests in SQL docs Fixed a search & replace gone awry Tweaked the docs a bit --- x-pack/docs/en/sql/index.asciidoc | 6 +++--- x-pack/docs/en/sql/language/syntax/select.asciidoc | 12 ++++++------ x-pack/docs/en/sql/overview.asciidoc | 2 ++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/x-pack/docs/en/sql/index.asciidoc b/x-pack/docs/en/sql/index.asciidoc index 4c213020892..f96b83db08a 100644 --- a/x-pack/docs/en/sql/index.asciidoc +++ b/x-pack/docs/en/sql/index.asciidoc @@ -35,11 +35,11 @@ indices and return results in tabular format. SQL and print tabular results. <>:: A JDBC driver for {es}. -<>:: - List of functions and operators supported. <>:: Overview of the {es-sql} language, such as supported data types, commands and syntax. +<>:: + List of functions and operators supported. -- include::overview.asciidoc[] @@ -47,8 +47,8 @@ include::getting-started.asciidoc[] include::concepts.asciidoc[] include::security.asciidoc[] include::endpoints/index.asciidoc[] -include::functions/index.asciidoc[] include::language/index.asciidoc[] +include::functions/index.asciidoc[] include::appendix/index.asciidoc[] :jdbc-tests!: diff --git a/x-pack/docs/en/sql/language/syntax/select.asciidoc b/x-pack/docs/en/sql/language/syntax/select.asciidoc index f39cbc0c2f8..35c2bf0737d 100644 --- a/x-pack/docs/en/sql/language/syntax/select.asciidoc +++ b/x-pack/docs/en/sql/language/syntax/select.asciidoc @@ -191,14 +191,14 @@ which results in something like: [source,text] -------------------------------------------------- author | name | page_count | release_date ------------------`--------------------`---------------`------------------------ +-----------------+--------------------+---------------+------------------------ Peter F. Hamilton|Pandora's Star |768 |2004-03-02T00:00:00.000Z Vernor Vinge |A Fire Upon the Deep|613 |1992-06-01T00:00:00.000Z Frank Herbert |Dune |604 |1965-06-01T00:00:00.000Z Alastair Reynolds|Revelation Space |585 |2000-03-15T00:00:00.000Z James S.A. Corey |Leviathan Wakes |561 |2011-06-02T00:00:00.000Z -------------------------------------------------- -// TESTRESPONSE[s/\|/\\|/ s/\`/\\`/] +// TESTRESPONSE[s/\|/\\|/ s/\+/\\+/] // TESTRESPONSE[_cat] [[sql-syntax-order-by-score]] @@ -228,13 +228,13 @@ Which results in something like: [source,text] -------------------------------------------------- SCORE() | author | name | page_count | release_date ----------------`---------------`-------------------`---------------`------------------------ +---------------+---------------+-------------------+---------------+------------------------ 2.288635 |Frank Herbert |Dune |604 |1965-06-01T00:00:00.000Z 1.8893257 |Frank Herbert |Dune Messiah |331 |1969-10-15T00:00:00.000Z 1.6086555 |Frank Herbert |Children of Dune |408 |1976-04-21T00:00:00.000Z 1.4005898 |Frank Herbert |God Emperor of Dune|454 |1981-05-28T00:00:00.000Z -------------------------------------------------- -// TESTRESPONSE[s/\|/\\|/ s/\`/\\`/ s/\(/\\\(/ s/\)/\\\)/] +// TESTRESPONSE[s/\|/\\|/ s/\+/\\+/ s/\(/\\\(/ s/\)/\\\)/] // TESTRESPONSE[_cat] Note that you can return `SCORE()` by adding it to the where clause. This @@ -253,13 +253,13 @@ POST /_xpack/sql?format=txt [source,text] -------------------------------------------------- SCORE() | author | name | page_count | release_date ----------------`---------------`-------------------`---------------`------------------------ +---------------+---------------+-------------------+---------------+------------------------ 2.288635 |Frank Herbert |Dune |604 |1965-06-01T00:00:00.000Z 1.4005898 |Frank Herbert |God Emperor of Dune|454 |1981-05-28T00:00:00.000Z 1.6086555 |Frank Herbert |Children of Dune |408 |1976-04-21T00:00:00.000Z 1.8893257 |Frank Herbert |Dune Messiah |331 |1969-10-15T00:00:00.000Z -------------------------------------------------- -// TESTRESPONSE[s/\|/\\|/ s/\`/\\`/ s/\(/\\\(/ s/\)/\\\)/] +// TESTRESPONSE[s/\|/\\|/ s/\+/\\+/ s/\(/\\\(/ s/\)/\\\)/] // TESTRESPONSE[_cat] NOTE: diff --git a/x-pack/docs/en/sql/overview.asciidoc b/x-pack/docs/en/sql/overview.asciidoc index 34d0dfb5383..36eff69f626 100644 --- a/x-pack/docs/en/sql/overview.asciidoc +++ b/x-pack/docs/en/sql/overview.asciidoc @@ -4,6 +4,7 @@ {es-sql} aims to provide a powerful yet lightweight SQL interface to {es}. [[sql-introduction]] +[float] === Introduction {es-sql} is an X-Pack component that allows SQL-like queries to be executed in real-time against {es}. @@ -12,6 +13,7 @@ _natively_ inside {es}. One can think of {es-sql} as a _translator_, one that understands both SQL and {es} and makes it easy to read and process data in real-time, at scale by leveraging {es} capabilities. [[sql-why]] +[float] === Why {es-sql} ? Native integration::