[indexPattern] added _score as a default meta field#4105
[indexPattern] added _score as a default meta field#4105spalger merged 2 commits intoelastic:masterfrom
Conversation
There was a problem hiding this comment.
Not a show-stopper, but adding an exception by field name here is unfortunate. Since this field is being forced into the mapping, it seems like there should be a property we could set that would indicate that it's sortable.
There was a problem hiding this comment.
I agree with you in principle, but there really is no other field like _score (in that they are always sortable) and I feel like whatever property we add to the spec will equal spec.name === '_score' anyway.
|
Overall this LGTM, just concerned about the handling of |
|
Opened #4256 to track you ask about adding _score to existing patterns. |
|
Merged master, once the tests pass I'll merge this. |
[indexPattern] added _score as a default meta field


While looking into #4012 I noticed that you can't even select
_scoreas a sort field right now. This is because the doc_viewer checks that the sorts field belongs to theindexPattern. This is a generally good behavior, so I figured it would make sense to add _score as one of the default_metaFields.For now, you can see this in action by opening up a fresh instance of discover and changing the sort field to
_score