private function getSortOrderParams(FieldInterface $field, array $sortOrderParams)
    {
        $sortOrderParams['field']   = $field->getMappingProperty(FieldInterface::ANALYZER_SORTABLE);
        $sortOrderParams['missing'] = $field->getSortMissing($sortOrderParams['direction']);

        if ($field->isNested() && !isset($sortOrderParams['nestedPath'])) {
            $sortOrderParams['nestedPath'] = $field->getNestedPath();
        }

        return $sortOrderParams;
    }