-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch Painless reference to Asciidoctor #783
Conversation
Switches the painless reference book from the no-longer-maintained AsciiDoc backend to the actively-maintained Asciidoctor backend. In the process this speeds up the build by a factor of three.
This needs elastic/elasticsearch#40805 and maybe others. |
The build is successful with elastic/elasticsearch#40805 but I haven't compared the diffs |
I'll make some diffs tomorrow after I backport the fix!
…On Wed, Apr 3, 2019, 17:25 Lisa Cawley ***@***.***> wrote:
The build is sucessful with elastic/elasticsearch#40805
<elastic/elasticsearch#40805> but I haven't
compared the diffs
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#783 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AANLopGhYfCzQ2IkrVPQw8KCUCFCHEvRks5vdRxTgaJpZM4cbF7L>
.
|
Here is a summary of the diff: painless-types.html: -AsciiDoc
+Asciidoctor
@@ -746,11 +746,7 @@
</span>
</dt>
<dd>
- A 32-bit, signed, two’s complement integer. Range: [-2
- <sup>
- 32, 2
- </sup>
- 32-1]. Default value: 0. Reference type: Integer.
+ A 32-bit, signed, two’s complement integer. Range: [-2^32, 2^32-1]. Default value: 0. Reference type: Integer.
</dd>
<dt>
<span class="term">
@@ -758,11 +754,7 @@
</span>
</dt>
<dd>
- A 64-bit, signed, two’s complement integer. Range: [-2
- <sup>
- 64, 2
- </sup>
- 64-1]. Default value: 0. Reference type: Long.
+ A 64-bit, signed, two’s complement integer. Range: [-2^64, 2^64-1]. Default value: 0. Reference type: Long.
</dd>
<dt>
<span class="term"> Asciidoc is better here. The painless-operators.html: -AsciiDoc
+Asciidoctor
@@ -906,7 +906,7 @@
</td>
<td align="left" valign="top">
<p>
- --
+ —
</p>
</td>
<td align="left" valign="top">
@@ -950,7 +950,7 @@
</td>
<td align="left" valign="top">
<p>
- --
+ —
</p>
</td>
<td align="left" valign="top"> Either way is fine by me. painless-execute-api.html: -AsciiDoc
+Asciidoctor
@@ -753,14 +753,26 @@
</code>
, which can be used to access user defined values. The result of the script is always converted to a string. If no context is specified then this context is used by default.
</p>
- <p>
- ====== Example
- </p>
- <p>
- Request:
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">POST /_scripts/painless/_execute
+ <div class="section">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h5 class="title">
+ <a id="_example">
+ </a>
+ Example
+ <a class="edit_me" href="https://github.com/elastic/elasticsearch/edit/6.5/docs/painless/painless-execute-script.asciidoc" rel="nofollow" title="Edit this page on GitHub">
+ edit
+ </a>
+ </h5>
+ </div>
+ </div>
+ </div>
+ <p>
+ Request:
+ </p>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">POST /_scripts/painless/_execute
{
"script": {
"source": "params.count / params.total",
@@ -770,16 +782,17 @@
}
}
}</pre>
- </div>
- <div class="console_widget" data-snippet="snippet">
- </div>
- <p>
- Response:
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">{
+ </div>
+ <div class="console_widget" data-snippet="snippet">
+ </div>
+ <p>
+ Response:
+ </p>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">{
"result": "0.1"
}</pre>
+ </div>
</div>
</div>
<div class="section">
@@ -835,11 +848,23 @@
</dd>
</dl>
</div>
- <p>
- ====== Example
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">PUT /my-index
+ <div class="section">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h5 class="title">
+ <a id="_example_2">
+ </a>
+ Example
+ <a class="edit_me" href="https://github.com/elastic/elasticsearch/edit/6.5/docs/painless/painless-execute-script.asciidoc" rel="nofollow" title="Edit this page on GitHub">
+ edit
+ </a>
+ </h5>
+ </div>
+ </div>
+ </div>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">PUT /my-index
{
"mappings": {
"_doc": {
@@ -868,16 +893,17 @@
}
}
}</pre>
- </div>
- <div class="console_widget" data-snippet="snippet">
- </div>
- <p>
- Response:
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">{
+ </div>
+ <div class="console_widget" data-snippet="snippet">
+ </div>
+ <p>
+ Response:
+ </p>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">{
"result": true
}</pre>
+ </div>
</div>
</div>
<div class="section">
@@ -949,11 +975,23 @@
</dd>
</dl>
</div>
- <p>
- ====== Example
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">PUT /my-index
+ <div class="section">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h5 class="title">
+ <a id="_example_3">
+ </a>
+ Example
+ <a class="edit_me" href="https://github.com/elastic/elasticsearch/edit/6.5/docs/painless/painless-execute-script.asciidoc" rel="nofollow" title="Edit this page on GitHub">
+ edit
+ </a>
+ </h5>
+ </div>
+ </div>
+ </div>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">PUT /my-index
{
"mappings": {
"_doc": {
@@ -986,16 +1024,17 @@
}
}
}</pre>
- </div>
- <div class="console_widget" data-snippet="snippet">
- </div>
- <p>
- Response:
- </p>
- <div class="pre_wrapper">
- <pre class="programlisting prettyprint lang-console">{
+ </div>
+ <div class="console_widget" data-snippet="snippet">
+ </div>
+ <p>
+ Response:
+ </p>
+ <div class="pre_wrapper">
+ <pre class="programlisting prettyprint lang-console">{
"result": 0.8
}</pre>
+ </div>
</div>
</div>
</div> It looks like asciidoctor is fixing a bug for us! painless-bucket-script-agg-context.html: -AsciiDoc
+Asciidoctor
@@ -689,7 +689,7 @@
<div>
<div>
<h3 class="title">
- <a id="_example">
+ <a id="_example_4">
</a>
Example
<a class="edit_me" href="https://github.com/elastic/elasticsearch/edit/6.5/docs/painless/painless-contexts/painless-bucket-script-agg-context.asciidoc" rel="nofollow" title="Edit this page on GitHub"> This isn't great but not too big a deal. |
@lcawl this is ready for you when you have a chance! |
Switches the painless reference book from the no-longer-maintained
AsciiDoc backend to the actively-maintained Asciidoctor backend. In the
process this speeds up the build by a factor of three.