scout-elasticsearch-driver icon indicating copy to clipboard operation
scout-elasticsearch-driver copied to clipboard

add more complex sort option (geo_distance eg)

Open lefrancoisjc opened this issue 6 years ago • 1 comments
trafficstars

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",
                ],
            ]
        );

lefrancoisjc avatar Mar 28 '19 13:03 lefrancoisjc

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

dzanfardino avatar Jun 11 '19 12:06 dzanfardino