From efffa0226de6081bf1e253f88454e6c5ca59770d Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 22 Jun 2018 15:40:25 -0700 Subject: [PATCH] [DOCS] Move sql to docs (#31474) --- docs/build.gradle | 82 +++++++++++++++++++ docs/reference/index.asciidoc | 2 +- .../reference}/sql/appendix/index.asciidoc | 0 .../sql/appendix/syntax-reserved.asciidoc | 2 + .../reference}/sql/concepts.asciidoc | 2 + .../reference}/sql/endpoints/cli.asciidoc | 2 + .../reference}/sql/endpoints/index.asciidoc | 0 .../reference}/sql/endpoints/jdbc.asciidoc | 2 + .../reference}/sql/endpoints/rest.asciidoc | 2 + .../sql/endpoints/translate.asciidoc | 2 + .../reference}/sql/functions/index.asciidoc | 2 + .../reference}/sql/getting-started.asciidoc | 2 + .../en => docs/reference}/sql/index.asciidoc | 1 + .../sql/language/data-types.asciidoc | 2 + .../reference}/sql/language/index.asciidoc | 2 + .../language/syntax/describe-table.asciidoc | 2 + .../sql/language/syntax/index.asciidoc | 2 + .../sql/language/syntax/select.asciidoc | 2 + .../sql/language/syntax/show-columns.asciidoc | 2 + .../language/syntax/show-functions.asciidoc | 2 + .../sql/language/syntax/show-tables.asciidoc | 2 + .../reference}/sql/overview.asciidoc | 2 + .../reference}/sql/security.asciidoc | 2 + 23 files changed, 120 insertions(+), 1 deletion(-) rename {x-pack/docs/en => docs/reference}/sql/appendix/index.asciidoc (100%) rename {x-pack/docs/en => docs/reference}/sql/appendix/syntax-reserved.asciidoc (98%) rename {x-pack/docs/en => docs/reference}/sql/concepts.asciidoc (99%) rename {x-pack/docs/en => docs/reference}/sql/endpoints/cli.asciidoc (97%) rename {x-pack/docs/en => docs/reference}/sql/endpoints/index.asciidoc (100%) rename {x-pack/docs/en => docs/reference}/sql/endpoints/jdbc.asciidoc (99%) rename {x-pack/docs/en => docs/reference}/sql/endpoints/rest.asciidoc (99%) rename {x-pack/docs/en => docs/reference}/sql/endpoints/translate.asciidoc (97%) rename {x-pack/docs/en => docs/reference}/sql/functions/index.asciidoc (99%) rename {x-pack/docs/en => docs/reference}/sql/getting-started.asciidoc (98%) rename {x-pack/docs/en => docs/reference}/sql/index.asciidoc (98%) rename {x-pack/docs/en => docs/reference}/sql/language/data-types.asciidoc (98%) rename {x-pack/docs/en => docs/reference}/sql/language/index.asciidoc (87%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/describe-table.asciidoc (87%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/index.asciidoc (94%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/select.asciidoc (99%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/show-columns.asciidoc (85%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/show-functions.asciidoc (89%) rename {x-pack/docs/en => docs/reference}/sql/language/syntax/show-tables.asciidoc (89%) rename {x-pack/docs/en => docs/reference}/sql/overview.asciidoc (97%) rename {x-pack/docs/en => docs/reference}/sql/security.asciidoc (98%) diff --git a/docs/build.gradle b/docs/build.gradle index f1d1324192b16..b04016c946eed 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -522,3 +522,85 @@ for (int i = 0; i < 5; i++) { {"index":{}} {"ip": "12.0.0.$i"}""" } +// Used by SQL because it looks SQL-ish +buildRestTests.setups['library'] = ''' + - do: + indices.create: + index: library + body: + settings: + number_of_shards: 1 + number_of_replicas: 1 + mappings: + book: + properties: + name: + type: text + fields: + keyword: + type: keyword + author: + type: text + fields: + keyword: + type: keyword + release_date: + type: date + page_count: + type: short + - do: + bulk: + index: library + type: book + refresh: true + body: | + {"index":{"_id": "Leviathan Wakes"}} + {"name": "Leviathan Wakes", "author": "James S.A. Corey", "release_date": "2011-06-02", "page_count": 561} + {"index":{"_id": "Hyperion"}} + {"name": "Hyperion", "author": "Dan Simmons", "release_date": "1989-05-26", "page_count": 482} + {"index":{"_id": "Dune"}} + {"name": "Dune", "author": "Frank Herbert", "release_date": "1965-06-01", "page_count": 604} + {"index":{"_id": "Dune Messiah"}} + {"name": "Dune Messiah", "author": "Frank Herbert", "release_date": "1969-10-15", "page_count": 331} + {"index":{"_id": "Children of Dune"}} + {"name": "Children of Dune", "author": "Frank Herbert", "release_date": "1976-04-21", "page_count": 408} + {"index":{"_id": "God Emperor of Dune"}} + {"name": "God Emperor of Dune", "author": "Frank Herbert", "release_date": "1981-05-28", "page_count": 454} + {"index":{"_id": "Consider Phlebas"}} + {"name": "Consider Phlebas", "author": "Iain M. Banks", "release_date": "1987-04-23", "page_count": 471} + {"index":{"_id": "Pandora's Star"}} + {"name": "Pandora's Star", "author": "Peter F. Hamilton", "release_date": "2004-03-02", "page_count": 768} + {"index":{"_id": "Revelation Space"}} + {"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585} + {"index":{"_id": "A Fire Upon the Deep"}} + {"name": "A Fire Upon the Deep", "author": "Vernor Vinge", "release_date": "1992-06-01", "page_count": 613} + {"index":{"_id": "Ender's Game"}} + {"name": "Ender's Game", "author": "Orson Scott Card", "release_date": "1985-06-01", "page_count": 324} + {"index":{"_id": "1984"}} + {"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328} + {"index":{"_id": "Fahrenheit 451"}} + {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227} + {"index":{"_id": "Brave New World"}} + {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268} + {"index":{"_id": "Foundation"}} + {"name": "Foundation", "author": "Isaac Asimov", "release_date": "1951-06-01", "page_count": 224} + {"index":{"_id": "The Giver"}} + {"name": "The Giver", "author": "Lois Lowry", "release_date": "1993-04-26", "page_count": 208} + {"index":{"_id": "Slaughterhouse-Five"}} + {"name": "Slaughterhouse-Five", "author": "Kurt Vonnegut", "release_date": "1969-06-01", "page_count": 275} + {"index":{"_id": "The Hitchhiker's Guide to the Galaxy"}} + {"name": "The Hitchhiker's Guide to the Galaxy", "author": "Douglas Adams", "release_date": "1979-10-12", "page_count": 180} + {"index":{"_id": "Snow Crash"}} + {"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470} + {"index":{"_id": "Neuromancer"}} + {"name": "Neuromancer", "author": "William Gibson", "release_date": "1984-07-01", "page_count": 271} + {"index":{"_id": "The Handmaid's Tale"}} + {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} + {"index":{"_id": "Starship Troopers"}} + {"name": "Starship Troopers", "author": "Robert A. Heinlein", "release_date": "1959-12-01", "page_count": 335} + {"index":{"_id": "The Left Hand of Darkness"}} + {"name": "The Left Hand of Darkness", "author": "Ursula K. Le Guin", "release_date": "1969-06-01", "page_count": 304} + {"index":{"_id": "The Moon is a Harsh Mistress"}} + {"name": "The Moon is a Harsh Mistress", "author": "Robert A. Heinlein", "release_date": "1966-04-01", "page_count": 288} + +''' \ No newline at end of file diff --git a/docs/reference/index.asciidoc b/docs/reference/index.asciidoc index ef8e345303137..7d51e4aa51264 100644 --- a/docs/reference/index.asciidoc +++ b/docs/reference/index.asciidoc @@ -57,7 +57,7 @@ include::index-modules.asciidoc[] include::ingest.asciidoc[] -include::{xes-repo-dir}/sql/index.asciidoc[] +include::sql/index.asciidoc[] include::monitoring/index.asciidoc[] diff --git a/x-pack/docs/en/sql/appendix/index.asciidoc b/docs/reference/sql/appendix/index.asciidoc similarity index 100% rename from x-pack/docs/en/sql/appendix/index.asciidoc rename to docs/reference/sql/appendix/index.asciidoc diff --git a/x-pack/docs/en/sql/appendix/syntax-reserved.asciidoc b/docs/reference/sql/appendix/syntax-reserved.asciidoc similarity index 98% rename from x-pack/docs/en/sql/appendix/syntax-reserved.asciidoc rename to docs/reference/sql/appendix/syntax-reserved.asciidoc index bbdefcbcb54aa..7a502d6eea939 100644 --- a/x-pack/docs/en/sql/appendix/syntax-reserved.asciidoc +++ b/docs/reference/sql/appendix/syntax-reserved.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [appendix] [[sql-syntax-reserved]] = Reserved Keywords diff --git a/x-pack/docs/en/sql/concepts.asciidoc b/docs/reference/sql/concepts.asciidoc similarity index 99% rename from x-pack/docs/en/sql/concepts.asciidoc rename to docs/reference/sql/concepts.asciidoc index f5eab6f37baf8..1dc23e391fab1 100644 --- a/x-pack/docs/en/sql/concepts.asciidoc +++ b/docs/reference/sql/concepts.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-concepts]] == Conventions and Terminology diff --git a/x-pack/docs/en/sql/endpoints/cli.asciidoc b/docs/reference/sql/endpoints/cli.asciidoc similarity index 97% rename from x-pack/docs/en/sql/endpoints/cli.asciidoc rename to docs/reference/sql/endpoints/cli.asciidoc index e04fd96ab7198..0908c2344bb15 100644 --- a/x-pack/docs/en/sql/endpoints/cli.asciidoc +++ b/docs/reference/sql/endpoints/cli.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-cli]] == SQL CLI diff --git a/x-pack/docs/en/sql/endpoints/index.asciidoc b/docs/reference/sql/endpoints/index.asciidoc similarity index 100% rename from x-pack/docs/en/sql/endpoints/index.asciidoc rename to docs/reference/sql/endpoints/index.asciidoc diff --git a/x-pack/docs/en/sql/endpoints/jdbc.asciidoc b/docs/reference/sql/endpoints/jdbc.asciidoc similarity index 99% rename from x-pack/docs/en/sql/endpoints/jdbc.asciidoc rename to docs/reference/sql/endpoints/jdbc.asciidoc index 84182f8b4a521..6a8793f7e24e2 100644 --- a/x-pack/docs/en/sql/endpoints/jdbc.asciidoc +++ b/docs/reference/sql/endpoints/jdbc.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="platinum"] [[sql-jdbc]] == SQL JDBC diff --git a/x-pack/docs/en/sql/endpoints/rest.asciidoc b/docs/reference/sql/endpoints/rest.asciidoc similarity index 99% rename from x-pack/docs/en/sql/endpoints/rest.asciidoc rename to docs/reference/sql/endpoints/rest.asciidoc index fa5093f8de528..f33189303e682 100644 --- a/x-pack/docs/en/sql/endpoints/rest.asciidoc +++ b/docs/reference/sql/endpoints/rest.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-rest]] == SQL REST API diff --git a/x-pack/docs/en/sql/endpoints/translate.asciidoc b/docs/reference/sql/endpoints/translate.asciidoc similarity index 97% rename from x-pack/docs/en/sql/endpoints/translate.asciidoc rename to docs/reference/sql/endpoints/translate.asciidoc index be6a77a3caa44..db450b5f914c8 100644 --- a/x-pack/docs/en/sql/endpoints/translate.asciidoc +++ b/docs/reference/sql/endpoints/translate.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-translate]] == SQL Translate API diff --git a/x-pack/docs/en/sql/functions/index.asciidoc b/docs/reference/sql/functions/index.asciidoc similarity index 99% rename from x-pack/docs/en/sql/functions/index.asciidoc rename to docs/reference/sql/functions/index.asciidoc index dd68370dde3e7..93d201a182828 100644 --- a/x-pack/docs/en/sql/functions/index.asciidoc +++ b/docs/reference/sql/functions/index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-functions]] == Functions and Operators diff --git a/x-pack/docs/en/sql/getting-started.asciidoc b/docs/reference/sql/getting-started.asciidoc similarity index 98% rename from x-pack/docs/en/sql/getting-started.asciidoc rename to docs/reference/sql/getting-started.asciidoc index 24f01910551bb..7d1bd33e8a035 100644 --- a/x-pack/docs/en/sql/getting-started.asciidoc +++ b/docs/reference/sql/getting-started.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-getting-started]] == Getting Started with SQL diff --git a/x-pack/docs/en/sql/index.asciidoc b/docs/reference/sql/index.asciidoc similarity index 98% rename from x-pack/docs/en/sql/index.asciidoc rename to docs/reference/sql/index.asciidoc index f96b83db08ad6..33b9da9fab93d 100644 --- a/x-pack/docs/en/sql/index.asciidoc +++ b/docs/reference/sql/index.asciidoc @@ -1,4 +1,5 @@ [role="xpack"] +[testenv="basic"] [[xpack-sql]] = SQL Access diff --git a/x-pack/docs/en/sql/language/data-types.asciidoc b/docs/reference/sql/language/data-types.asciidoc similarity index 98% rename from x-pack/docs/en/sql/language/data-types.asciidoc rename to docs/reference/sql/language/data-types.asciidoc index 7e5f045aa6ce9..7f98add97248b 100644 --- a/x-pack/docs/en/sql/language/data-types.asciidoc +++ b/docs/reference/sql/language/data-types.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-data-types]] == Data Types diff --git a/x-pack/docs/en/sql/language/index.asciidoc b/docs/reference/sql/language/index.asciidoc similarity index 87% rename from x-pack/docs/en/sql/language/index.asciidoc rename to docs/reference/sql/language/index.asciidoc index fdf6f3e7950ca..6558e9ad92bf8 100644 --- a/x-pack/docs/en/sql/language/index.asciidoc +++ b/docs/reference/sql/language/index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-spec]] == SQL Language diff --git a/x-pack/docs/en/sql/language/syntax/describe-table.asciidoc b/docs/reference/sql/language/syntax/describe-table.asciidoc similarity index 87% rename from x-pack/docs/en/sql/language/syntax/describe-table.asciidoc rename to docs/reference/sql/language/syntax/describe-table.asciidoc index 114def470b181..dd2d27a5781d2 100644 --- a/x-pack/docs/en/sql/language/syntax/describe-table.asciidoc +++ b/docs/reference/sql/language/syntax/describe-table.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-syntax-describe-table]] === DESCRIBE TABLE diff --git a/x-pack/docs/en/sql/language/syntax/index.asciidoc b/docs/reference/sql/language/syntax/index.asciidoc similarity index 94% rename from x-pack/docs/en/sql/language/syntax/index.asciidoc rename to docs/reference/sql/language/syntax/index.asciidoc index e0e970edae14b..4af8f19d7034b 100644 --- a/x-pack/docs/en/sql/language/syntax/index.asciidoc +++ b/docs/reference/sql/language/syntax/index.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-commands]] == SQL Commands diff --git a/x-pack/docs/en/sql/language/syntax/select.asciidoc b/docs/reference/sql/language/syntax/select.asciidoc similarity index 99% rename from x-pack/docs/en/sql/language/syntax/select.asciidoc rename to docs/reference/sql/language/syntax/select.asciidoc index 35c2bf0737db9..4a7c0534b68a3 100644 --- a/x-pack/docs/en/sql/language/syntax/select.asciidoc +++ b/docs/reference/sql/language/syntax/select.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-syntax-select]] === SELECT diff --git a/x-pack/docs/en/sql/language/syntax/show-columns.asciidoc b/docs/reference/sql/language/syntax/show-columns.asciidoc similarity index 85% rename from x-pack/docs/en/sql/language/syntax/show-columns.asciidoc rename to docs/reference/sql/language/syntax/show-columns.asciidoc index 2e7c8f7bfca69..a52c744f17a97 100644 --- a/x-pack/docs/en/sql/language/syntax/show-columns.asciidoc +++ b/docs/reference/sql/language/syntax/show-columns.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-syntax-show-columns]] === SHOW COLUMNS diff --git a/x-pack/docs/en/sql/language/syntax/show-functions.asciidoc b/docs/reference/sql/language/syntax/show-functions.asciidoc similarity index 89% rename from x-pack/docs/en/sql/language/syntax/show-functions.asciidoc rename to docs/reference/sql/language/syntax/show-functions.asciidoc index 197b9e8cb3b79..964cdf39081c6 100644 --- a/x-pack/docs/en/sql/language/syntax/show-functions.asciidoc +++ b/docs/reference/sql/language/syntax/show-functions.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-syntax-show-functions]] === SHOW FUNCTIONS diff --git a/x-pack/docs/en/sql/language/syntax/show-tables.asciidoc b/docs/reference/sql/language/syntax/show-tables.asciidoc similarity index 89% rename from x-pack/docs/en/sql/language/syntax/show-tables.asciidoc rename to docs/reference/sql/language/syntax/show-tables.asciidoc index 9266b6d58058b..7772c39c6fc21 100644 --- a/x-pack/docs/en/sql/language/syntax/show-tables.asciidoc +++ b/docs/reference/sql/language/syntax/show-tables.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-syntax-show-tables]] === SHOW TABLES diff --git a/x-pack/docs/en/sql/overview.asciidoc b/docs/reference/sql/overview.asciidoc similarity index 97% rename from x-pack/docs/en/sql/overview.asciidoc rename to docs/reference/sql/overview.asciidoc index 36eff69f6263d..a72f5ca61feb5 100644 --- a/x-pack/docs/en/sql/overview.asciidoc +++ b/docs/reference/sql/overview.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-overview]] == Overview diff --git a/x-pack/docs/en/sql/security.asciidoc b/docs/reference/sql/security.asciidoc similarity index 98% rename from x-pack/docs/en/sql/security.asciidoc rename to docs/reference/sql/security.asciidoc index bba73a2a4de6d..64f554f023195 100644 --- a/x-pack/docs/en/sql/security.asciidoc +++ b/docs/reference/sql/security.asciidoc @@ -1,3 +1,5 @@ +[role="xpack"] +[testenv="basic"] [[sql-security]] == Security