11[[discover-search-for-relevance]]
22== Search for relevance
3- Sometimes you might be unsure which documents best match your search.
43{es} assigns a relevancy, or score to each document, so you can
54can narrow your search to the documents with the most relevant results.
65The higher the score, the better it matches your query.
@@ -12,25 +11,23 @@ the <<gs-get-data-into-kibana, sample flights data set>>, or you can use your ow
1211. In *Discover*, open the index pattern dropdown, and select that data you want to work with.
1312+
1413For the sample flights data, set the index pattern to *kibana_sample_data_flights*.
15- . In the query bar, click *KQL*, and then turn it off.
16- +
17- You're now using the <<lucene-query, Lucene query syntax>>.
14+
1815. Run your search. For the sample data, try:
1916+
2017```ts
2118Warsaw OR Venice OR Clear
2219```
2320. If you don't see any results, expand the <<set-time-filter,time range>>, for example to *Last 7 days*.
2421. From the list of *Available fields*, add `_score` and any other fields you want to the document table.
25- . To sort the `_score` column in descending order, hover over its header, and then click twice on
26- the arrow icon
27- image:images/double-arrow.png[Double arrow icon to indicate sorting] so it changes to
22+ . To sort the `_score` column in descending order, hover over its header, and set
23+ the sort icon to
2824image:images/downward-arrow.png[Downward pointing arrow to indicate descending sorting].
2925+
3026At this point, you're doing a multi-column sort: first by `Time`, and then by `_score`.
31- . To turn off sorting for the `Time` field, hover over its header, and then click the down arrow.
27+ . To turn off sorting for the `Time` field, hover over its header, and set the sort icon to
28+ image:images/double-arrow.png[Arrow on both ends of the icon indicates sorting is off].
3229+
3330Your table now sorts documents from most to least relevant.
3431+
3532[role="screenshot"]
36- image::images/discover-search-for-relevance.png["Example of a search for relevance "]
33+ image::images/discover-search-for-relevance.png["Documents are sorted from most relevant to least relevant. "]
0 commit comments