Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-59736
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 11, 2020
2 parents c212a23 + 2231693 commit 099fe50
Show file tree
Hide file tree
Showing 61 changed files with 2,106 additions and 3,154 deletions.
18 changes: 8 additions & 10 deletions docs/getting-started/tutorial-discovering.asciidoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
[[tutorial-discovering]]
=== Discover your data

Using *Discover*, you can enter
Using *Discover*, enter
an {ref}/query-dsl-query-string-query.html#query-string-syntax[Elasticsearch
query] to search your data and filter the results.

. Open *Discover*.
. Open *Discover*.
+
The current index pattern appears below the filter bar, in this case `shakes*`.
You might need to click *New* in the menu bar to refresh the data.
The `shakes*` index pattern appears.

. Click the caret to the right of the current index pattern, and select `ba*`.
. To make `ba*` the current index, click the index pattern dropdown, then select `ba*`.
+
By default, all fields are shown for each matching document.

. In the search field, enter the following string:
. In the search field, enter:
+
[source,text]
account_number<100 AND balance>47500
Expand All @@ -25,11 +24,10 @@ excess of 47,500. Results appear for account numbers 8, 32, 78, 85, and 97.
[role="screenshot"]
image::images/tutorial-discover-2.png[]

. To choose which
fields to display, hover the pointer over the list of *Available fields*
and then click *add* next to each field you want include as a column in the table.
. Hover over the list of *Available fields*, then
click *add* next to each field you want include as a column in the table.
+
For example, if you add the `account_number` field, the display changes to a list of five
For example, when you add the `account_number` field, the display changes to a list of five
account numbers.
+
[role="screenshot"]
Expand Down
75 changes: 34 additions & 41 deletions docs/management/managing-fields.asciidoc
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[[managing-fields]]
== Index Patterns and Fields
== Index patterns and fields

The *Index patterns* UI helps you create and manage
the index patterns that retrieve your data from Elasticsearch.
the index patterns that retrieve your data from {es}.

[role="screenshot"]
image::images/management-index-patterns.png[]

[float]
=== Create an index pattern

An index pattern is the glue that connects Kibana to your Elasticsearch data. Create an
index pattern whenever you load your own data into Kibana. To get started,
An index pattern is the glue that connects {kib} to your {es} data. Create an
index pattern whenever you load your own data into {kib}. To get started,
click *Create index pattern*, and then follow the guided steps. Refer to
<<index-patterns, Creating an index pattern>> for the types of index patterns
that you can create.
Expand All @@ -33,7 +33,7 @@ you create is automatically designated as the default pattern. The default
index pattern is loaded when you open *Discover*.

* *Refresh the index fields list.* You can refresh the index fields list to
pick up any newly-added fields. Doing so also resets Kibana’s popularity counters
pick up any newly-added fields. Doing so also resets the {kib} popularity counters
for the fields. The popularity counters are used in *Discover* to sort fields in lists.

* [[delete-pattern]]*Delete the index pattern.* This action removes the pattern from the list of
Expand All @@ -60,7 +60,7 @@ Kibana has field formatters for the following field types:
* <<field-formatters-numeric, Numbers>>

[[field-formatters-string]]
=== String Field Formatters
=== String field formatters

String fields support the `String` and `Url` formatters.

Expand All @@ -69,7 +69,7 @@ include::field-formatters/string-formatter.asciidoc[]
include::field-formatters/url-formatter.asciidoc[]

[[field-formatters-date]]
=== Date Field Formatters
=== Date field formatters

Date fields support the `Date`, `Url`, and `String` formatters.

Expand All @@ -81,19 +81,19 @@ include::field-formatters/string-formatter.asciidoc[]
include::field-formatters/url-formatter.asciidoc[]

[[field-formatters-geopoint]]
=== Geographic Point Field Formatters
=== Geographic point field formatters

Geographic point fields support the `String` formatter.

include::field-formatters/string-formatter.asciidoc[]

[[field-formatters-numeric]]
=== Numeric Field Formatters
=== Numeric field formatters

Numeric fields support the `Url`, `Bytes`, `Duration`, `Number`, `Percentage`, `String`, and `Color` formatters.

The `Bytes`, `Number`, and `Percentage` formatters enable you to choose the display formats of numbers in this field using
the <<numeral, Elastic numeral pattern>> syntax that Kibana maintains.
the <<numeral, Elastic numeral pattern>> syntax that {kib} maintains.

include::field-formatters/url-formatter.asciidoc[]

Expand All @@ -104,70 +104,63 @@ include::field-formatters/duration-formatter.asciidoc[]
include::field-formatters/color-formatter.asciidoc[]

[[scripted-fields]]
=== Scripted Fields
=== Scripted fields

Scripted fields compute data on the fly from the data in your Elasticsearch indices. Scripted field data is shown on
the Discover tab as part of the document data, and you can use scripted fields in your visualizations.
Scripted field values are computed at query time so they aren't indexed and cannot be searched using Kibana's default
query language. However they can be queried using Kibana's new <<kuery-query, experimental query language>>. Scripted
fields are also supported in the filter bar.
Scripted fields compute data on the fly from the data in your {es} indices. The data is shown on
the Discover tab as part of the document data, and you can use scripted fields in your visualizations. You query scripted fields with the <<kuery-query, {kib} query language>>, and can filter them using the filter bar. The scripted field values are computed at query time, so they aren't indexed and cannot be searched using the {kib} default
query language.

WARNING: Computing data on the fly with scripted fields can be very resource intensive and can have a direct impact on
Kibana's performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are
{kib} performance. Keep in mind that there's no built-in validation of a scripted field. If your scripts are
buggy, you'll get exceptions whenever you try to view the dynamically generated data.

When you define a scripted field in Kibana, you have a choice of scripting languages. Starting with 5.0, the default
When you define a scripted field in {kib}, you have a choice of scripting languages. In 5.0 and later, the default
options are {ref}/modules-scripting-expression.html[Lucene expressions] and {ref}/modules-scripting-painless.html[Painless].
While you can use other scripting languages if you enable dynamic scripting for them in Elasticsearch, this is not recommended
While you can use other scripting languages if you enable dynamic scripting for them in {es}, this is not recommended
because they cannot be sufficiently {ref}/modules-scripting-security.html[sandboxed].

WARNING: Use of Groovy, JavaScript, and Python scripting is deprecated starting in Elasticsearch 5.0, and support for those
scripting languages will be removed in the future.
WARNING: In 5.0 and later, Groovy, JavaScript, and Python scripting are deprecated and unsupported.

You can reference any single value numeric field in your expressions, for example:

----
doc['field_name'].value
----

For more background on scripted fields and additional examples, refer to this blog:
https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in Kibana scripted fields]
For more information on scripted fields and additional examples, refer to
https://www.elastic.co/blog/using-painless-kibana-scripted-fields[Using Painless in {kib} scripted fields]

[float]
[[create-scripted-field]]
=== Creating a Scripted Field
To create a scripted field:
=== Create a scripted field

. Go to *Management > Kibana > Index Patterns*
. Go to *Management > {kib} > Index Patterns*
. Select the index pattern you want to add a scripted field to.
. Go to the pattern's *Scripted fields* tab.
. Click *Add scripted field*.
. Go to the *Scripted fields* tab for the index pattern, then click *Add scripted field*.
. Enter a name for the scripted field.
. Enter the expression that you want to use to compute a value on the fly from your index data.
. Click *Create field*.

For more information about scripted fields in Elasticsearch, see
For more information about scripted fields in {es}, see
{ref}/modules-scripting.html[Scripting].

[float]
[[update-scripted-field]]
=== Updating a Scripted Field
To modify a scripted field:
=== Update a scripted field

. Go to *Management > Kibana > Index Patterns*
. Click the index pattern's *Scripted fields* tab.
. Go to *Management > {kib} > Index Patterns*
. Click the *Scripted fields* tab for the index pattern.
. Click the *Edit* button for the scripted field you want to change.
. Make your changes and then click *Save field* to update the field.
. Make your changes, then click *Save field*.

WARNING: Keep in mind that there's no built-in validation of a scripted field. If your scripts are buggy, you'll get
WARNING: Built-in validation is unsupported for scripted fields. If your scripts are buggy, you'll get
exceptions whenever you try to view the dynamically generated data.

[float]
[[delete-scripted-field]]
=== Deleting a Scripted Field
To delete a scripted field:
=== Delete a scripted field

. Go to *Management > Kibana > Index Patterns*
. Click the index pattern's *Scripted fields* tab.
. Click the *Delete* button for the scripted field you want to remove.
. Click *Delete* in the confirmation window.
. Go to *Management > {kib} > Index Patterns*
. Click the *Scripted fields* tab for the index pattern.
. Click *Delete* for the scripted field you want to remove.
. Click *Delete* on the confirmation window.
10 changes: 5 additions & 5 deletions src/dev/run_check_published_api_changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const runApiExtractor = (
// ConsoleMessageId.ApiReportNotCopied
log.warning(`You have changed the signature of the ${folder} Core API`);
log.warning(
'To accept these changes run `node scripts/check_core_api_changes.js --accept` and then:\n' +
'To accept these changes run `node scripts/check_published_api_changes.js --accept` and then:\n' +
"\t 1. Commit the updated documentation and API review file '" +
config.reportFilePath +
"' \n" +
Expand Down Expand Up @@ -173,20 +173,20 @@ async function run(folder: string): Promise<boolean> {
if (opts.help) {
process.stdout.write(
dedent(chalk`
{dim usage:} node scripts/check_core_api_changes [...options]
{dim usage:} node scripts/check_published_api_changes [...options]
Checks for any changes to the Kibana Core API
Examples:
{dim # Checks for any changes to the Kibana Core API}
{dim $} node scripts/check_core_api_changes
{dim $} node scripts/check_published_api_changes
{dim # Checks for any changes to the Kibana Core API and updates the documentation}
{dim $} node scripts/check_core_api_changes --docs
{dim $} node scripts/check_published_api_changes --docs
{dim # Checks for and automatically accepts and updates documentation for any changes to the Kibana Core API}
{dim $} node scripts/check_core_api_changes --accept
{dim $} node scripts/check_published_api_changes --accept
Options:
--accept {dim Accepts all changes by updating the API Review files and documentation}
Expand Down
2 changes: 1 addition & 1 deletion tasks/config/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = function(grunt) {
}),

// used by the test tasks
// runs the check_core_api_changes script to ensure API changes are explictily accepted
// runs the check_published_api_changes script to ensure API changes are explictily accepted
checkDocApiChanges: scriptWithGithubChecks({
title: 'Check core API changes',
cmd: NODE,
Expand Down
2 changes: 0 additions & 2 deletions x-pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { crossClusterReplication } from './legacy/plugins/cross_cluster_replicat
import { upgradeAssistant } from './legacy/plugins/upgrade_assistant';
import { uptime } from './legacy/plugins/uptime';
import { encryptedSavedObjects } from './legacy/plugins/encrypted_saved_objects';
import { transform } from './legacy/plugins/transform';
import { actions } from './legacy/plugins/actions';
import { alerting } from './legacy/plugins/alerting';
import { lens } from './legacy/plugins/lens';
Expand Down Expand Up @@ -61,7 +60,6 @@ module.exports = function(kibana) {
infra(kibana),
taskManager(kibana),
rollup(kibana),
transform(kibana),
siem(kibana),
remoteClusters(kibana),
crossClusterReplication(kibana),
Expand Down
Loading

0 comments on commit 099fe50

Please sign in to comment.