Hi, iam trying to sort based on geopoint and i am ...
# community-help
g
Hi, iam trying to sort based on geopoint and i am getting the following results, Typesense: 27.1 Collection A
Copy code
{
  "name": "A",
  "fields": [
    {
      "name": "title",
      "type": "string"
    },
    {
      "name": "b_id",
      "type": "string",
      "reference": "B.id"
    },
    {
      "name": "location",
      "type": "geopoint"
    }
  ]
}
Sample Document:
Copy code
{
  "id": "a.1",
  "title": "1st Document",
  "b_id": "b.1",
  "location": [
    52.47288,
    -1.899156
  ]
}
Collection B
Copy code
{
  "name": "B",
  "fields": [
    {
      "name": "name",
      "type": "string"
    },
    {
      "name": "geoLat",
      "type": "geopoint"
    }
  ]
}
Sample Document
Copy code
{
  "geoLat": [
    52.47288,
    -1.899156
  ],
  "id": "b.1",
  "name": "1st Document in B"
}
When i try to query collection A with sort_by as
location(52.5191058, -1.8820982):asc
The result has
Copy code
"geo_distance_meters": {
     "location": 5266
 }
When i try to use sort_by using geoLat from collection B in gives me a different distance even though both location values are same
$B(geoLat(52.5191058, -1.8820982):asc)
Result:
Copy code
"geo_distance_meters": {
      "geoLat": 2147483647
 }
k
We fixed a few bugs related to geosort on joined collections. Can you please try on
28.0.rc16
g
Sure
It works as expected in
28.0.rc16
, when can we expect this to be released?
k
We release GA versions as and when we accumulate enough changes. But we do have folks using RC builds in production. They are generally stable and contain a mix of new features and bug fixes.
g
Understood, Thanks