Search for relevance

edit

Search for relevance

edit

Elasticsearch 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.

This example shows how to use Discover to list your documents from most relevant to least relevant. This example uses the sample flights data set, or you can use your own data.

  1. 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.

  2. Run your search. For the sample data, try:

    Warsaw OR Venice OR Clear
  3. If you don’t see any results, expand the time range, for example to Last 7 days.
  4. From the list of Available fields, add _score and any other fields you want to the document table.
  5. To sort the _score column in descending order, hover over its header, and set the sort icon to Downward pointing arrow to indicate descending sorting.

    At this point, you’re doing a multi-column sort: first by Time, and then by _score.

  6. To turn off sorting for the Time field, hover over its header, and set the sort icon to Arrow on both ends of the icon indicates sorting is off.

    Your table now sorts documents from most to least relevant.

    Documents are sorted from most relevant to least relevant.