Skip to content

Order of sortings by preference. #14

@ysb

Description

@ysb

Hi,

I am searching news in my project, and i need to order them by published_at:desc first. But the package is adding _score before all sortings in query. If you are ok, i can do a PR and add a config key for it. So it will be changeable by project.

The code i am talking about is below. Waiting for your response. Thanks.

        // Sorting
        if(isset($options['sorting']) && count($options['sorting'])) {
            $params['body']['sort'] = array_merge($params['body']['sort'],
                $options['sorting']);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions