diff --git a/docs/discover/context.asciidoc b/docs/discover/context.asciidoc index b4054b9cd22f..98e70b5137c8 100644 --- a/docs/discover/context.asciidoc +++ b/docs/discover/context.asciidoc @@ -15,13 +15,33 @@ image::images/Expanded-Document.png[Expanded Document] The context view displays a number of documents before and after the anchor document. The anchor document itself is highlighted in blue. The view is sorted by the time field specified in the index pattern configuration and uses the -same set of columns as the Discover view the context was opened from. +same set of columns as the Discover view the context was opened from. If there +are multiple documents with the same time field value, the internal document +order is used as a secondary sorting criterion by default. + +[NOTE] +-- +The field used for tiebreaking in case of equal time field values can be +configured using the advanced setting `context:tieBreakerFields` in +< Advanced Settings*>>, which defaults to the +`_doc` field. The value of this setting can be a comma-separated list of field +names, which will be checked in sequence for suitability when a context is +about to be displayed. The first suitable field is then used as the tiebreaking +field. A field is suitable if the field exists and is sortable in the index +pattern the context is based on. + +While not required, it is recommended to only +use fields which have {es-ref}doc-values.html[doc values] enabled to achieve +good performance and avoid unnecessary {es-ref}modules-fielddata.html[field +data] usage. Common examples for suitable fields include log line numbers, +monotonically increasing counters and high-precision timestamps. +-- image::images/Discover-ContextView.png[Context View] NOTE: The number of documents displayed by default can be configured via the `context:defaultSize` setting in < -Advanced Options*>>. +Advanced Settings*>>. === Changing the Context Size @@ -44,7 +64,7 @@ image::images/Discover-ContextView-SizePicker-Older.png[] NOTE: The default number of documents loaded with each button click can be configured via the `context:step` setting in < -Advanced Options*>>. +Advanced Settings*>>. === Filtering the Context