mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Make sort options configurable. Closes #3125
This commit is contained in:
parent
9ff7304018
commit
83d8e3688e
2 changed files with 7 additions and 5 deletions
|
@ -8,6 +8,11 @@ define(function () {
|
|||
description: 'Options for the lucene query string parser',
|
||||
type: 'json'
|
||||
},
|
||||
'sort:options': {
|
||||
value: '{ "unmapped_type": "boolean" }',
|
||||
description: 'Options the Elasticsearch sort parameter',
|
||||
type: 'json'
|
||||
},
|
||||
'dateFormat': {
|
||||
value: 'MMMM Do YYYY, HH:mm:ss.SSS',
|
||||
description: 'When displaying a pretty formatted date, use this format',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
define(function (require) {
|
||||
var _ = require('lodash');
|
||||
return function normalizeSortRequest() {
|
||||
return function normalizeSortRequest(config) {
|
||||
/**
|
||||
* Decorate queries with default parameters
|
||||
* @param {query} query object
|
||||
|
@ -8,10 +8,7 @@ define(function (require) {
|
|||
*/
|
||||
return function (sortObject) {
|
||||
if (!_.isArray(sortObject)) sortObject = [sortObject];
|
||||
var defaultSortOptions = {
|
||||
// Will cause indices missing the field to use null as sort.
|
||||
unmapped_type: 'boolean'
|
||||
};
|
||||
var defaultSortOptions = config.get('sort:options');
|
||||
|
||||
/*
|
||||
Normalize the sort description to the more verbose format:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue