| @@ 83-90 (lines=8) @@ | ||
| 80 | 'ignore_unmapped' => $ignoreUnmapped, | |
| 81 | ]; | |
| 82 | ||
| 83 |         if (isset($options['sortNestedPath'])) { | |
| 84 | $path = is_callable($options['sortNestedPath']) ? | |
| 85 | $options['sortNestedPath']($sortField) : $options['sortNestedPath']; | |
| 86 | ||
| 87 |             if (!empty($path)) { | |
| 88 | $sort['nested_path'] = $path; | |
| 89 | } | |
| 90 | } | |
| 91 | ||
| 92 |         if (isset($options['sortNestedFilter'])) { | |
| 93 | $filter = is_callable($options['sortNestedFilter']) ? | |
| @@ 92-99 (lines=8) @@ | ||
| 89 | } | |
| 90 | } | |
| 91 | ||
| 92 |         if (isset($options['sortNestedFilter'])) { | |
| 93 | $filter = is_callable($options['sortNestedFilter']) ? | |
| 94 | $options['sortNestedFilter']($sortField) : $options['sortNestedFilter']; | |
| 95 | ||
| 96 |             if (!empty($filter)) { | |
| 97 | $sort['nested_filter'] = $filter; | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | return $sort; | |
| 102 | } | |