Skip to content

Commit

Permalink
Merge branch 'master' into issues/83385
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Sep 2, 2021
2 parents dbb9eed + 3cdced3 commit 239e268
Show file tree
Hide file tree
Showing 22 changed files with 123 additions and 43 deletions.
Binary file modified docs/discover/images/add-field-to-pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/customer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/discover-from-visualize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/discover-search-for-relevance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/document-table-expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/document-table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/double-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/downward-arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/discover/images/hello-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions docs/discover/search-for-relevance.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[[discover-search-for-relevance]]
== Search for relevance
Sometimes you might be unsure which documents best match your search.
{es} assigns a relevancy, or score to each document, so you can
can narrow your search to the documents with the most relevant results.
The higher the score, the better it matches your query.
Expand All @@ -12,25 +11,23 @@ the <<gs-get-data-into-kibana, sample flights data set>>, or you can use your ow
. In *Discover*, open the index pattern dropdown, and select that data you want to work with.
+
For the sample flights data, set the index pattern to *kibana_sample_data_flights*.
. In the query bar, click *KQL*, and then turn it off.
+
You're now using the <<lucene-query, Lucene query syntax>>.

. Run your search. For the sample data, try:
+
```ts
Warsaw OR Venice OR Clear
```
. If you don't see any results, expand the <<set-time-filter,time range>>, for example to *Last 7 days*.
. From the list of *Available fields*, add `_score` and any other fields you want to the document table.
. To sort the `_score` column in descending order, hover over its header, and then click twice on
the arrow icon
image:images/double-arrow.png[Double arrow icon to indicate sorting] so it changes to
. To sort the `_score` column in descending order, hover over its header, and set
the sort icon to
image:images/downward-arrow.png[Downward pointing arrow to indicate descending sorting].
+
At this point, you're doing a multi-column sort: first by `Time`, and then by `_score`.
. To turn off sorting for the `Time` field, hover over its header, and then click the down arrow.
. To turn off sorting for the `Time` field, hover over its header, and set the sort icon to
image:images/double-arrow.png[Arrow on both ends of the icon indicates sorting is off].
+
Your table now sorts documents from most to least relevant.
+
[role="screenshot"]
image::images/discover-search-for-relevance.png["Example of a search for relevance"]
image::images/discover-search-for-relevance.png["Documents are sorted from most relevant to least relevant."]
8 changes: 3 additions & 5 deletions docs/user/discover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you are using the sample data, this value was set when you added the data.
If you are using your own data, and it does not have a time field, the range selection is not available.

. To view the count of documents for a given time in the specified range,
click and drag the mouse over the histogram.
click and drag the mouse over the chart.

[float]
[[explore-fields-in-your-data]]
Expand Down Expand Up @@ -108,7 +108,7 @@ them to your document table. Your table should look similar to this:
image:images/document-table.png[Document table with fields for manufacturer, customer_first_name, and customer_last_name]

. To rearrange the table columns, hover the mouse over a
column header, and then use the move controls.
column header, and then use the move control.

. To view more of the document table, click *Hide chart*.

Expand Down Expand Up @@ -275,7 +275,7 @@ image:images/discover-maps.png[Map containing documents]
[[share-your-findings]]
=== Share your findings

To share your findings with a larger audience, click *Share* in the toolbar. For detailed information about the sharing options, refer to <<reporting-getting-started,Reporting>>.
To share your findings with a larger audience, click *Share* in the *Discover* toolbar. For detailed information about the sharing options, refer to <<reporting-getting-started,Reporting>>.


[float]
Expand All @@ -285,8 +285,6 @@ To share your findings with a larger audience, click *Share* in the toolbar. For

* <<discover-search-for-relevance, Search for relevance>>.

* <<reporting-getting-started, Present your findings in a report>>.

* <<kibana-discover-settings, Configure Discover>> to better meet your needs.
Go to **Advanced Settings** to configure the number of documents to show,
the table columns that display by default, and more.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ export const mockGlobalState: State = {
activeTab: TimelineTabs.query,
prevActiveTab: TimelineTabs.notes,
deletedEventIds: [],
documentType: '',
queryFields: [],
selectAll: false,
id: 'test',
savedObjectId: null,
columns: defaultHeaders,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,7 @@ export const mockTimelineModel: TimelineModel = {
},
deletedEventIds: [],
description: 'This is a sample rule description',
documentType: '',
eqlOptions: {
eventCategoryField: 'event.category',
tiebreakerField: 'event.sequence',
Expand Down Expand Up @@ -2017,13 +2018,15 @@ export const mockTimelineModel: TimelineModel = {
kqlQuery: {
filterQuery: null,
},
queryFields: [],
itemsPerPage: 25,
itemsPerPageOptions: [10, 25, 50, 100],
loadingEventIds: [],
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
savedObjectId: 'ef579e40-jibber-jabber',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -2110,6 +2113,7 @@ export const defaultTimelineProps: CreateTimelineProps = {
dateRange: { end: '2018-11-05T19:03:25.937Z', start: '2018-11-05T18:58:25.937Z' },
deletedEventIds: [],
description: '',
documentType: '',
eqlOptions: {
eventCategoryField: 'event.category',
query: '',
Expand Down Expand Up @@ -2141,7 +2145,9 @@ export const defaultTimelineProps: CreateTimelineProps = {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: null,
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ describe('alert actions', () => {
},
deletedEventIds: [],
description: 'This is a sample rule description',
documentType: '',
eqlOptions: {
eventCategoryField: 'event.category',
query: '',
Expand Down Expand Up @@ -204,7 +205,9 @@ describe('alert actions', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: null,
selectAll: false,
selectedEventIds: {},
show: true,
showCheckboxes: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -328,7 +329,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -366,6 +369,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -398,7 +402,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -436,6 +442,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -468,7 +475,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -504,6 +513,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -536,7 +546,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -577,6 +589,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -612,6 +625,8 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -680,6 +695,7 @@ describe('helpers', () => {
dateRange: { start: '2020-07-07T08:20:18.966Z', end: '2020-07-08T08:20:18.966Z' },
dataProviders: [],
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -758,6 +774,8 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -791,6 +809,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { end: '2020-10-28T11:37:31.655Z', start: '2020-10-27T11:37:31.655Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -823,7 +842,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down Expand Up @@ -861,6 +882,7 @@ describe('helpers', () => {
dataProviders: [],
dateRange: { end: '2020-07-08T08:20:18.966Z', start: '2020-07-07T08:20:18.966Z' },
description: '',
documentType: '',
deletedEventIds: [],
eqlOptions: {
eventCategoryField: 'event.category',
Expand Down Expand Up @@ -893,7 +915,9 @@ describe('helpers', () => {
noteIds: [],
pinnedEventIds: {},
pinnedEventsSaveObject: {},
queryFields: [],
savedObjectId: 'savedObject-1',
selectAll: false,
selectedEventIds: {},
show: false,
showCheckboxes: false,
Expand Down
Loading

0 comments on commit 239e268

Please sign in to comment.