Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchResultHit.GeoDistanceMeter is of incorrect type #187

Open
rahulchander1 opened this issue Dec 10, 2024 · 0 comments
Open

SearchResultHit.GeoDistanceMeter is of incorrect type #187

rahulchander1 opened this issue Dec 10, 2024 · 0 comments

Comments

@rahulchander1
Copy link

Description

  • Am performing a query with a geo-precision search in the sort_by clause, and when the search is completed, I get the following error: json: cannot unmarshal number 421.0 into Go struct field SearchResultHit.results.hits.geo_distance_meters of type int

Steps to reproduce

Make a collection, and include a geoPoint field
My example search is below

  • Collection: campus
  • Query: *
  • Query-By: name
  • Filter: coordinates:(34.05000000,-118.44000000,50.00000000 mi), where coordinates is the geopoint field
  • Sort: coordinates(34.05000, -118.44000, precision: 5mi):asc, dateCreated:desc
  • Page: 1
  • PerPage: 5

Was able to replicate this on both single search and multi search

Expected Behavior

Would expect it to return an int OR have the object be a float

Actual Behavior

Is actually returning a float where an int is expected

Metadata

Typesense Version: typesense v27.1

Go Version: 1.21.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant