Dashboard JSON search - query or filter context?

Hi,

I am using Kibana 4.6.4.

I have noticed that some JSON searches in a Dashboard are run using the query context, others the filter context.

Example:

{ "more_like_this":{"like" : "Lorem Ipsum..."} }
=> { "query": { "filtered": { "filter": { "bool": { "must": [{ "query": {"more_like_this":{"like" : "Lorem Ipsum..." } } } ] } } } } }

{ "query_string": { "query": "Lorem Ipsum..." } }
=> { "query": { "filtered": { "query": { "bool": { "must": [{ "query_string": { "query": "Lorem Ipsum..." } }] } } } } }

How can I have my MLT search results sorted by relevance in the Dashboard?

In 4.6.4, anything you type into the query bar will contribute to scoring. Filters in the filter bar will not. Note that this changed in 5.x, where everything currently contributes to scoring.

You can sort by score by adding it as a column in Discover:

I believe _score is also the default sort field if your index pattern has no timestamp field.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.