Skip to content
This repository has been archived by the owner on Nov 4, 2021. It is now read-only.

add more complex sort option (geo_distance eg) #208

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jclappiway
Copy link

now we can dot something like

Model::search('*')->whereGeoDistance('pin', $position, '500m')->from($offset)->take($limit)->sort([
                "_geo_distance" => [
                    "pin" => $position,
                    "order" => "asc",
                    "unit" => "km",
                    "distance_type" => "plane",
                ],
            ]
        );

Copy link
Author

@jclappiway jclappiway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update style

@dzanfardino
Copy link

Hi, is this going to be merged at any point ? Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants