mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[DOCS] Swap [float]
for [discrete]
(#60124)
Changes instances of `[float]` in our docs for `[discrete]`. Asciidoctor prefers the `[discrete]` tag for floating headings: https://asciidoctor.org/docs/asciidoc-asciidoctor-diffs/#blocks
This commit is contained in:
parent
8ad8421262
commit
2774cd6938
258 changed files with 1023 additions and 1023 deletions
|
@ -5,7 +5,7 @@ Lucene's expressions compile a `javascript` expression to bytecode. They are
|
|||
designed for high-performance custom ranking and sorting functions and are
|
||||
enabled for `inline` and `stored` scripting by default.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Performance
|
||||
|
||||
Expressions were designed to have competitive performance with custom Lucene code.
|
||||
|
@ -14,7 +14,7 @@ scripting engines: expressions do more "up-front".
|
|||
|
||||
This allows for very fast execution, even faster than if you had written a `native` script.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Syntax
|
||||
|
||||
Expressions support a subset of javascript syntax: a single expression.
|
||||
|
@ -32,7 +32,7 @@ Variables in `expression` scripts are available to access:
|
|||
You can use Expressions scripts for `script_score`, `script_fields`, sort scripts, and numeric aggregation
|
||||
scripts, simply set the `lang` parameter to `expression`.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Numeric field API
|
||||
[cols="<,<",options="header",]
|
||||
|=======================================================================
|
||||
|
@ -66,7 +66,7 @@ When a document is missing the field completely, by default the value will be tr
|
|||
Boolean fields are exposed as numerics, with `true` mapped to `1` and `false` mapped to `0`.
|
||||
For example: `doc['on_sale'].value ? doc['price'].value * 0.5 : doc['price'].value`
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Date field API
|
||||
Date fields are treated as the number of milliseconds since January 1, 1970 and
|
||||
support the Numeric Fields API above, plus access to some date-specific fields:
|
||||
|
@ -111,7 +111,7 @@ The following example shows the difference in years between the `date` fields da
|
|||
|
||||
`doc['date1'].date.year - doc['date0'].date.year`
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[geo-point-field-api]]
|
||||
=== `geo_point` field API
|
||||
[cols="<,<",options="header",]
|
||||
|
@ -132,7 +132,7 @@ The following example computes distance in kilometers from Washington, DC:
|
|||
In this example the coordinates could have been passed as parameters to the script,
|
||||
e.g. based on geolocation of the user.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Limitations
|
||||
|
||||
There are a few limitations relative to other script languages:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
Depending on where a script is used, it will have access to certain special
|
||||
variables and document fields.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
== Update scripts
|
||||
|
||||
A script used in the <<docs-update,update>>,
|
||||
|
@ -16,7 +16,7 @@ API will have access to the `ctx` variable which exposes:
|
|||
`ctx.op`:: The operation that should be applied to the document: `index` or `delete`.
|
||||
`ctx._index` etc:: Access to <<mapping-fields,document meta-fields>>, some of which may be read-only.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
== Search and aggregation scripts
|
||||
|
||||
With the exception of <<request-body-search-script-fields,script fields>> which are
|
||||
|
@ -32,7 +32,7 @@ Field values can be accessed from a script using
|
|||
each of which is explained below.
|
||||
|
||||
[[scripting-score]]
|
||||
[float]
|
||||
[discrete]
|
||||
=== Accessing the score of a document within a script
|
||||
|
||||
Scripts used in the <<query-dsl-function-score-query,`function_score` query>>,
|
||||
|
@ -79,7 +79,7 @@ GET my_index/_search
|
|||
-------------------------------------
|
||||
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-doc-vals]]
|
||||
=== Doc values
|
||||
|
||||
|
@ -138,7 +138,7 @@ access `text` fields from scripts.
|
|||
|
||||
===================================================
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-source]]
|
||||
=== The document `_source`
|
||||
|
||||
|
@ -200,7 +200,7 @@ GET my_index/_search
|
|||
}
|
||||
-------------------------------
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-stored]]
|
||||
=== Stored fields
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ all software has bugs and it is important to minimize the risk of failure in
|
|||
any security layer. Find below rules of thumb for how to keep Elasticsearch
|
||||
from being a vulnerability.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Do not run as root
|
||||
First and foremost, never run Elasticsearch as the `root` user as this would
|
||||
allow any successful effort to circumvent the other security layers to do
|
||||
|
@ -16,7 +16,7 @@ allow any successful effort to circumvent the other security layers to do
|
|||
that it is running as `root` but this is so important that it is worth double
|
||||
and triple checking.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Do not expose Elasticsearch directly to users
|
||||
Do not expose Elasticsearch directly to users, instead have an application
|
||||
make requests on behalf of users. If this is not possible, have an application
|
||||
|
@ -26,7 +26,7 @@ to write a <<search, `_search`>> that overwhelms Elasticsearch and brings down
|
|||
the cluster. All such searches should be considered bugs and the Elasticsearch
|
||||
contributors make an effort to prevent this but they are still possible.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Do not expose Elasticsearch directly to the Internet
|
||||
Do not expose Elasticsearch to the Internet, instead have an application
|
||||
make requests on behalf of the Internet. Do not entertain the thought of having
|
||||
|
@ -49,7 +49,7 @@ Bad:
|
|||
* Users can write arbitrary scripts, queries, `_search` requests.
|
||||
* User actions make documents with structure defined by users.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-other-layers]]
|
||||
=== Other security layers
|
||||
In addition to user privileges and script sandboxing Elasticsearch uses the
|
||||
|
@ -75,7 +75,7 @@ when allowing more than the defaults. Any extra permissions weakens the total
|
|||
security of the Elasticsearch deployment.
|
||||
|
||||
[[allowed-script-types-setting]]
|
||||
[float]
|
||||
[discrete]
|
||||
=== Allowed script types setting
|
||||
|
||||
Elasticsearch supports two script types: `inline` and `stored` (<<modules-scripting-using>>).
|
||||
|
@ -91,7 +91,7 @@ script.allowed_types: inline <1>
|
|||
(or any other types).
|
||||
|
||||
[[allowed-script-contexts-setting]]
|
||||
[float]
|
||||
[discrete]
|
||||
=== Allowed script contexts setting
|
||||
|
||||
By default all script contexts are allowed to be executed. This can be modified using the
|
||||
|
|
|
@ -43,7 +43,7 @@ GET my_index/_search
|
|||
}
|
||||
-------------------------------------
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
=== Script parameters
|
||||
|
||||
`lang`::
|
||||
|
@ -106,7 +106,7 @@ for ingest contexts. You can change these settings dynamically by setting
|
|||
|
||||
========================================
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-short-script-form]]
|
||||
=== Short script form
|
||||
A short script form can be used for brevity. In the short form, `script` is represented
|
||||
|
@ -130,7 +130,7 @@ The same script in the normal form:
|
|||
----------------------
|
||||
// NOTCONSOLE
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-stored-scripts]]
|
||||
=== Stored scripts
|
||||
|
||||
|
@ -145,7 +145,7 @@ privileges to create, retrieve, and delete stored scripts:
|
|||
For more information, see <<security-privileges>>.
|
||||
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
==== Request examples
|
||||
|
||||
The following are examples of using a stored script that lives at
|
||||
|
@ -222,7 +222,7 @@ DELETE _scripts/calculate-score
|
|||
-----------------------------------
|
||||
// TEST[continued]
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-search-templates]]
|
||||
=== Search templates
|
||||
You can also use the `_scripts` API to store **search templates**. Search
|
||||
|
@ -237,7 +237,7 @@ mistakes.
|
|||
Search templates use the http://mustache.github.io/mustache.5.html[mustache
|
||||
templating language]. See <<search-template>> for more information and examples.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-using-caching]]
|
||||
=== Script caching
|
||||
|
||||
|
@ -412,7 +412,7 @@ DELETE /_ingest/pipeline/my_test_scores_pipeline
|
|||
We recommend testing and benchmarking any indexing changes before deploying them
|
||||
in production.
|
||||
|
||||
[float]
|
||||
[discrete]
|
||||
[[modules-scripting-errors]]
|
||||
=== Script errors
|
||||
Elasticsearch returns error details when there is a compliation or runtime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue