Commit graph

8560 commits

Author SHA1 Message Date
Alan Woodward
34b13c2595 Add index-time scripts to date field mapper (#71633)
This commit allows you to set 'script' and 'on_script_error' parameters
on date field mappers, meaning that runtime date fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-14 09:32:52 +01:00
Nik Everett
13a7f23ccf
Advise against dates with decimal points (#71578) (#71652)
We accept dates with a decimal point like `2113413.13241324` and parse
them *somehow*. But there are cases where we'll lose precision on those
dates, see #70085. This advises folks not to use that format. We'll
continue to accept those dates for backwards compatibility but you
should avoid using them.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
2021-04-13 15:42:32 -04:00
Lyudmila Fokina
3c7731dd3f
Warn users if security is implicitly disabled (#71650)
* Warn users if security is implicitly disabled (#70114)

Elasticsearch has security features implicitly disabled by default for
Basic and Trial licenses, unless explicitly set in the configuration
file.
This may be good for onboarding, but it also lead to unintended insecure
 clusters.
 This change introduces clear warnings when security features are
 implicitly disabled.
 - a warning header in each REST response if security is implicitly
 disabled;
 - a log message during cluster boot.
2021-04-13 20:51:52 +02:00
Nik Everett
f1e5650a79
Convert parent-join example script to runtime field (backport of #71423) (#71631)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `parent_join` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291
2021-04-13 09:22:51 -04:00
Nik Everett
9950afbabe
Fit runtime field on line (backport #71470) (#71600)
This shrinks a runtime field definition so that it fits on the screen
without scrolling. It also converts the doc into a test so we can be
sure it continues to work.

Relates to #69291
2021-04-13 08:59:27 -04:00
Alan Woodward
5ad0001774 Add index-time scripts to IP field mapper (#71617)
This commit allows you to set 'script' and 'on_script_error' parameters
on IP field mappers, meaning that runtime IP fields can be made indexed
simply by moving their definitions from the runtime section of the mappings
to the properties section.
2021-04-13 13:56:53 +01:00
Nik Everett
db4911fa9f
Convert date_nanos example script to runtime field (backport of #71351) (#71594)
Runtime fields are much more flexible than script_fields because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `date_nanos` field in a script to a
runtime field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do something.

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-12 18:12:42 -04:00
Luca Cavanna
1c5a8685e8
Output script stats for indexed fields (#71219)
We have recently introduced the ability to associate an indexed field with a script. This commit updates the existing mappings stats to output stats about the script, similar to what we already do for runtime fields.
2021-04-12 18:25:57 +02:00
Alan Woodward
3268d449c9 Add scripts to keyword field mapper (#71555)
This commit adds script and on_script_error parameters to
keyword field mappers, allowing you to define index-time scripts
for keyword fields.
2021-04-12 16:58:51 +01:00
Luca Cavanna
29a875f693
Add support for script parameter to boolean field mapper (#71454)
Relates to #68984
2021-04-12 11:53:50 +02:00
Nhat Nguyen
5913b79dd3
Allow specify dynamic templates in bulk request (#71518)
This change allows users to specify dynamic templates in a bulk request.

```
PUT myindex
{
  "mappings": {
    "dynamic_templates": [{
      "time_histograms": {
        "mapping": {
          "type": "histogram",
          "meta": {
            "unit": "s"
          }
        }
      }
    }]
  }
}
```

```
POST myindex/_bulk
{ "index": { "dynamic_templates": { "response_times": "time_histograms" } } }
{ "@timestamp": "2020-08-12", "response_times": { "values": [1, 10], "counts": [5, 1] }}
```

Closes #61939
2021-04-10 10:14:11 -04:00
James Rodewig
77bb387d8c
[DOCS] Move JSON encoding section (#71508) (#71534) 2021-04-10 09:26:44 -04:00
James Rodewig
2676c47783 [DOCS] Fix create enrich policy API title 2021-04-08 17:54:01 -04:00
James Rodewig
ed74d0b15c
[DOCS] Document REST API uses UTF-8 encoding (#71474) (#71500)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-04-08 16:03:02 -04:00
Julie Tibshirani
4205b04173 Support fetching _tier field value (#71379)
Now that the `fields` option allows fetching metadata fields, we can support
loading the new `_tier` metadata field.

Relates to #63569 and #68135.
2021-04-08 12:57:48 -07:00
James Rodewig
71daaba676
[DOCS] Fix create enrich policy API title (#71494) (#71496) 2021-04-08 15:50:54 -04:00
Adam Locke
939325146a
[DOCS] Update mapping API to require index name (#71489) (#71491) 2021-04-08 14:12:16 -04:00
James Rodewig
9ec05e7f4f [DOCS] Fix search template label 2021-04-08 13:14:29 -04:00
James Rodewig
9a250c0e59
[DOCS] Reorder EQL sections. Remove duplicated content. (#71477) (#71478) 2021-04-08 11:52:41 -04:00
James Rodewig
7dc88559e0 [DOCS] Fix GeoIP capitalization 2021-04-07 14:26:51 -04:00
Adam Locke
d0d5376e03
[DOCS] [7.x] Adding page for indexing runtime fields #71366 (#71431)
* [DOCS] Adding page for indexing runtime fields (#71366)

* [DOCS] Adding page for indexing runtime fields

* Fixing tests.

* Incorporating review feedback to enhance and improve examples.

* Changing note to indicate immutable script when indexing, plus adding on_script_error.

* Add type to responses for 7.x
2021-04-07 13:32:33 -04:00
markharwood
754cda81bc
New queryable "_tier" metadata field (#69288) (#71123)
* New _tier metadata field that supports term, terms, exists and wildcard queries on the first data tier preference stated for an index.

Backport of 3aee4c1f1f

Closes #68135
2021-04-07 15:44:32 +01:00
Adam Locke
69a6a8c087
Fix typo in "handing" (missing "l") (#71383) (#71399)
Co-authored-by: Gonzalo Servat <gonz@elastic.co>
2021-04-07 10:24:30 -04:00
James Rodewig
9d04e61da8 [DOCS] Add redirect for missing geoIP stats API docs (#71402) 2021-04-07 09:16:21 -04:00
James Rodewig
aaacb796f1
[DOCS] Update size your shards for max_primary_shard_size (#71367) (#71372) 2021-04-07 08:28:10 -04:00
David Turner
6fb0cf637d
Include node roles in cluster state JSON response (#71391)
Today the response to `GET _cluster/state` does not include the roles of
the nodes in the cluster. In the past this made sense, roles were
relatively unchanging things that could be determined from elsewhere.
These days we have an increasingly rich collection of roles, with
nontrivial BWC implications, so it is important for debugging to be able
to see the specific roles as viewed by the master. This commit adds the
role names to the cluster state API output.

Relates #71385
Backport of #71386
2021-04-07 11:54:41 +01:00
James Rodewig
79027377b8
[DOCS] Use HTML-unescaped Mustache variables in ingest pipelines (#71360) (#71368) 2021-04-06 15:47:09 -04:00
Nik Everett
5964825f88
Convert boolean field example to runtime fields (backport of #71341) (#71364)
Runtime fields are much more flexible than `script_fields` because you
can filter and aggregate on them so we hope folks use them! This
converts the example of using a `boolean` field in a script to a runtime
field so folks get used to seeing them and hopefully using them.

While I was editing this I took the opportunity to replace the script
with a real-ish example. Scripts that just load the field value are nice
and short but I hope no one uses them in real life because they just add
overhead when compared to accessing the field directly. So I made the
script do *something*.

Relates to #69291
2021-04-06 15:09:23 -04:00
James Rodewig
def089f87d
[DOCS] Refactor rollover API docs (#70938) (#71355) 2021-04-06 12:43:27 -04:00
Adam Locke
d0e7cc3332
[DOCS] Update runtime fields for script query (#71338) (#71347)
Fixes typo, moves example out of a NOTE admonition, and puts context before the example.
2021-04-06 11:01:28 -04:00
Alan Woodward
729fbbb7cd Add note that scripted fields will reject documents with a source value in their field (#71340) 2021-04-06 14:30:47 +01:00
James Rodewig
f27800abbb [DOCS] Swap event.original for message 2021-04-06 06:52:30 -04:00
Tanguy Leroux
9a1d34cb47
Document CCR auto-follow patterns and searchable snapshots indices (#70863) (#71319)
This commit adds a note in CCR document about auto-follow 
patterns that should not match searchable snapshots indices.

Relates #70580 (comment)
2021-04-06 11:35:29 +02:00
Ryan Ernst
d58d9941e2
Add multiple data paths deprecation to docs (#71312)
This commit adds a deprecation note to the multiple data paths doc. It also removes mention of multiple paths support in the setup settings table.

relates #71205
2021-04-05 16:29:17 -07:00
Nik Everett
317afdf433
Point script query docs at runtime fields (backport of #71291) (#71300)
This adds a "note" on the docs for the script query pointing folks to
runtime fields because they are more flexible. It also translates the
request example into runtime fields.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-05 16:54:16 -04:00
James Rodewig
53685e9010
[DOCS] Add how-to guide for time series data (#71195) (#71296) 2021-04-05 15:03:20 -04:00
Nik Everett
121ecb959d
Convert metric aggs docs runtime fields (backport of #71260) (#71298)
This replaces the `script` docs for bucket aggregations with runtime
fields. We expect runtime fields to be nicer to work with because you
can also fetch them or filter on them. We expect them to be faster
because their don't need this sort of `instanceof` tree:
a92a647b9f/server/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java (L42)

Relates to #69291

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-05 13:24:19 -04:00
James Rodewig
8d0149e053 [DOCS] Remove unneeded articles for Elasticsearch Service and Elastic Agent 2021-04-02 16:02:47 -04:00
Adam Locke
ba8e0ac105
[DOCS] Expand examples for runtime fields in a search query (#71237) (#71256)
* Add warning admonition for removing runtime fields.

* Add cross-link to runtime fields.

* Expanding examples for runtime fields in a search request.

* Clarifying language and simplifying response tests.
2021-04-02 15:26:39 -04:00
Nik Everett
1b35100ab0
Convert bucket aggs docs to runtime fields (backport #71202) (#71248)
This replaces the `script` docs for bucket aggregations with runtime
fields. We expect runtime fields to be nicer to work with because you
can also fetch them or filter on them. We expect them to be faster
because their don't need this sort of `instanceof` tree:
a92a647b9f/server/src/main/java/org/elasticsearch/search/aggregations/support/values/ScriptDoubleValues.java (L42)

Relates to #69291

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-04-02 12:40:19 -04:00
James Rodewig
eae97dec42
[DOCS] Fix 'Register a snapshot repo' title (#71224) (#71229) 2021-04-02 09:47:34 -04:00
James Rodewig
8220f5cb21
[DOCS] Rename Glossary (#71222) (#71227)
Changes title from "Glossary of terms" to "Glossary."
"Glossary of terms" is redundant.
2021-04-02 09:34:23 -04:00
James Rodewig
06ff249a14
[DOCS] Update button copy (#71220) (#71225) 2021-04-02 09:34:06 -04:00
James Rodewig
79b69dd164
[DOCS] Add ECS and runtime fields tip to data stream tutorial (#71183) (#71200) 2021-04-01 16:12:24 -04:00
James Rodewig
676708b1af [DOCS] Rename ES Reference to ES Guide (#71198) 2021-04-01 15:39:19 -04:00
Lee Hinman
7962e9ad34
Make searchable snapshot cache size effectively zero on non-frozen nodes (#71134)
* Make searchable snapshot cache size effectively zero on non-frozen nodes

This commits makes the shared_cache searchable snapshot cache size setting resolve to 0 for nodes
that to do have the data_frozen node role.

Tangentially related to #70341
Supercedes #70846

* Update message in HasFrozenCacheAllocationDecider
2021-04-01 12:10:48 -06:00
James Rodewig
b7bca93a35 [DOCS] Reword data stream indexing section 2021-04-01 10:24:26 -04:00
James Rodewig
20d8b3172f [DOCS] Reword link to Fleet data stream docs 2021-04-01 10:16:22 -04:00
James Rodewig
b96e07aadb [DOCS] Remove unused widget files 2021-04-01 08:36:16 -04:00
James Rodewig
4c7a730767
[DOCS] Refactor data stream setup tutorial (#71074) (#71152) 2021-03-31 18:22:12 -04:00