Skip to content

Commit e47fca9

Browse files
committed
[DOCS] Remove unneeded options from [source,sql] code blocks (#42759)
In AsciiDoc, `subs="attributes,callouts,macros"` options were required to render `include-tagged::` in a code block. With elastic/docs#827, Elasticsearch Reference documentation migrated from AsciiDoc to Asciidoctor. In Asciidoctor, the `subs="attributes,callouts,macros"` options are no longer needed to render `include-tagged::` in a code block. This commit removes those unneeded options. Resolves #41589
1 parent ff597db commit e47fca9

File tree

13 files changed

+99
-100
lines changed

13 files changed

+99
-100
lines changed

docs/reference/sql/functions/date-time.asciidoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,72 +7,72 @@ experimental[]
77

88
* Extract the year from a date (`YEAR`)
99

10-
["source","sql",subs="attributes,callouts,macros"]
10+
[source, sql]
1111
--------------------------------------------------
1212
include-tagged::{sql-specs}/datetime.csv-spec[year]
1313
--------------------------------------------------
1414

1515
* Extract the month of the year from a date (`MONTH_OF_YEAR` or `MONTH`)
1616

17-
["source","sql",subs="attributes,callouts,macros"]
17+
[source, sql]
1818
--------------------------------------------------
1919
include-tagged::{sql-specs}/datetime.csv-spec[monthOfYear]
2020
--------------------------------------------------
2121

2222
* Extract the week of the year from a date (`WEEK_OF_YEAR` or `WEEK`)
2323

24-
["source","sql",subs="attributes,callouts,macros"]
24+
[source, sql]
2525
--------------------------------------------------
2626
include-tagged::{sql-specs}/datetime.csv-spec[weekOfYear]
2727
--------------------------------------------------
2828

2929
* Extract the day of the year from a date (`DAY_OF_YEAR` or `DOY`)
3030

31-
["source","sql",subs="attributes,callouts,macros"]
31+
[source, sql]
3232
--------------------------------------------------
3333
include-tagged::{sql-specs}/datetime.csv-spec[dayOfYear]
3434
--------------------------------------------------
3535

3636
* Extract the day of the month from a date (`DAY_OF_MONTH`, `DOM`, or `DAY`)
3737

38-
["source","sql",subs="attributes,callouts,macros"]
38+
[source, sql]
3939
--------------------------------------------------
4040
include-tagged::{sql-specs}/datetime.csv-spec[dayOfMonth]
4141
--------------------------------------------------
4242

4343
* Extract the day of the week from a date (`DAY_OF_WEEK` or `DOW`).
4444
Monday is `1`, Tuesday is `2`, etc.
4545

46-
["source","sql",subs="attributes,callouts,macros"]
46+
[source, sql]
4747
--------------------------------------------------
4848
include-tagged::{sql-specs}/datetime.csv-spec[dayOfWeek]
4949
--------------------------------------------------
5050

5151
* Extract the hour of the day from a date (`HOUR_OF_DAY` or `HOUR`).
5252
Monday is `1`, Tuesday is `2`, etc.
5353

54-
["source","sql",subs="attributes,callouts,macros"]
54+
[source, sql]
5555
--------------------------------------------------
5656
include-tagged::{sql-specs}/datetime.csv-spec[hourOfDay]
5757
--------------------------------------------------
5858

5959
* Extract the minute of the day from a date (`MINUTE_OF_DAY`).
6060

61-
["source","sql",subs="attributes,callouts,macros"]
61+
[source, sql]
6262
--------------------------------------------------
6363
include-tagged::{sql-specs}/datetime.csv-spec[minuteOfDay]
6464
--------------------------------------------------
6565

6666
* Extract the minute of the hour from a date (`MINUTE_OF_HOUR`, `MINUTE`).
6767

68-
["source","sql",subs="attributes,callouts,macros"]
68+
[source, sql]
6969
--------------------------------------------------
7070
include-tagged::{sql-specs}/datetime.csv-spec[minuteOfHour]
7171
--------------------------------------------------
7272

7373
* Extract the second of the minute from a date (`SECOND_OF_MINUTE`, `SECOND`).
7474

75-
["source","sql",subs="attributes,callouts,macros"]
75+
[source, sql]
7676
--------------------------------------------------
7777
include-tagged::{sql-specs}/datetime.csv-spec[secondOfMinute]
7878
--------------------------------------------------
@@ -83,14 +83,14 @@ As an alternative, one can support `EXTRACT` to extract fields from datetimes.
8383
You can run any <<sql-functions-datetime,datetime function>>
8484
with `EXTRACT(<datetime_function> FROM <expression>)`. So
8585

86-
["source","sql",subs="attributes,callouts,macros"]
86+
[source, sql]
8787
--------------------------------------------------
8888
include-tagged::{sql-specs}/datetime.csv-spec[extractDayOfYear]
8989
--------------------------------------------------
9090

9191
is the equivalent to
9292

93-
["source","sql",subs="attributes,callouts,macros"]
93+
[source, sql]
9494
--------------------------------------------------
9595
include-tagged::{sql-specs}/datetime.csv-spec[dayOfYear]
9696
--------------------------------------------------

docs/reference/sql/functions/operators.asciidoc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,42 @@ Boolean operator for comparing against one or multiple expressions.
99

1010
* Equality (`=`)
1111

12-
["source","sql",subs="attributes,callouts,macros"]
12+
[source, sql]
1313
--------------------------------------------------
1414
include-tagged::{sql-specs}/filter.sql-spec[whereFieldEquality]
1515
--------------------------------------------------
1616

1717
* Inequality (`<>` or `!=` or `<=>`)
1818

19-
["source","sql",subs="attributes,callouts,macros"]
19+
[source, sql]
2020
--------------------------------------------------
2121
include-tagged::{sql-specs}/filter.sql-spec[whereFieldNonEquality]
2222
--------------------------------------------------
2323

2424
* Comparison (`<`, `<=`, `>`, `>=`)
2525

26-
["source","sql",subs="attributes,callouts,macros"]
26+
[source, sql]
2727
--------------------------------------------------
2828
include-tagged::{sql-specs}/filter.sql-spec[whereFieldLessThan]
2929
--------------------------------------------------
3030

3131
* `BETWEEN`
3232

33-
["source","sql",subs="attributes,callouts,macros"]
33+
[source, sql]
3434
--------------------------------------------------
3535
include-tagged::{sql-specs}/filter.sql-spec[whereBetween]
3636
--------------------------------------------------
3737

3838
* `IS NULL`/`IS NOT NULL`
3939

40-
["source","sql",subs="attributes,callouts,macros"]
40+
[source, sql]
4141
--------------------------------------------------
4242
include-tagged::{sql-specs}/filter.sql-spec[whereIsNotNullAndIsNull]
4343
--------------------------------------------------
4444

4545
* `IN (<value1>, <value2>, ...)`
4646

47-
["source","sql",subs="attributes,callouts,macros"]
47+
[source, sql]
4848
--------------------------------------------------
4949
include-tagged::{sql-specs}/filter.sql-spec[whereWithInAndMultipleValues]
5050
--------------------------------------------------
@@ -58,21 +58,21 @@ Boolean operator for evaluating one or two expressions.
5858

5959
* `AND`
6060

61-
["source","sql",subs="attributes,callouts,macros"]
61+
[source, sql]
6262
--------------------------------------------------
6363
include-tagged::{sql-specs}/filter.sql-spec[whereFieldAndComparison]
6464
--------------------------------------------------
6565

6666
* `OR`
6767

68-
["source","sql",subs="attributes,callouts,macros"]
68+
[source, sql]
6969
--------------------------------------------------
7070
include-tagged::{sql-specs}/filter.sql-spec[whereFieldOrComparison]
7171
--------------------------------------------------
7272

7373
* `NOT`
7474

75-
["source","sql",subs="attributes,callouts,macros"]
75+
[source, sql]
7676
--------------------------------------------------
7777
include-tagged::{sql-specs}/filter.sql-spec[whereFieldEqualityNot]
7878
--------------------------------------------------
@@ -87,42 +87,42 @@ The result is a value of numeric type.
8787

8888
* Add (`+`)
8989

90-
["source","sql",subs="attributes,callouts,macros"]
90+
[source, sql]
9191
--------------------------------------------------
9292
include-tagged::{sql-specs}/arithmetic.sql-spec[plus]
9393
--------------------------------------------------
9494

9595
* Subtract (infix `-`)
9696

97-
["source","sql",subs="attributes,callouts,macros"]
97+
[source, sql]
9898
--------------------------------------------------
9999
include-tagged::{sql-specs}/arithmetic.sql-spec[minus]
100100
--------------------------------------------------
101101

102102
* Negate (unary `-`)
103103

104-
["source","sql",subs="attributes,callouts,macros"]
104+
[source, sql]
105105
--------------------------------------------------
106106
include-tagged::{sql-specs}/arithmetic.sql-spec[unaryMinus]
107107
--------------------------------------------------
108108

109109
* Multiply (`*`)
110110

111-
["source","sql",subs="attributes,callouts,macros"]
111+
[source, sql]
112112
--------------------------------------------------
113113
include-tagged::{sql-specs}/arithmetic.sql-spec[multiply]
114114
--------------------------------------------------
115115

116116
* Divide (`/`)
117117

118-
["source","sql",subs="attributes,callouts,macros"]
118+
[source, sql]
119119
--------------------------------------------------
120120
include-tagged::{sql-specs}/arithmetic.sql-spec[divide]
121121
--------------------------------------------------
122122

123123
* https://en.wikipedia.org/wiki/Modulo_operation[Modulo] or Reminder(`%`)
124124

125-
["source","sql",subs="attributes,callouts,macros"]
125+
[source, sql]
126126
--------------------------------------------------
127127
include-tagged::{sql-specs}/arithmetic.sql-spec[mod]
128128
--------------------------------------------------

docs/reference/sql/functions/search.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ combined using the same rules as {es}'s
2424

2525
Typically `SCORE` is used for ordering the results of a query based on their relevance:
2626

27-
["source","sql",subs="attributes,callouts,macros"]
27+
[source, sql]
2828
----
2929
include-tagged::{sql-specs}/docs.csv-spec[orderByScore]
3030
----
3131

3232
However, it is perfectly fine to return the score without sorting by it:
3333

34-
["source","sql",subs="attributes,callouts,macros"]
34+
[source, sql]
3535
----
3636
include-tagged::{sql-specs}/docs.csv-spec[scoreWithMatch]
3737
----

0 commit comments

Comments
 (0)