question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failed to find geopoint field

See original GitHub issue

I have seperate fields of latitude and longitude (lat and lng) in my django model. I want to use GeoPoint field but getting error failed to find geopoint field.

In my models file , I have added function: @property def type_to_string(self): return { 'lat': self.lat, 'lon': self.lng }

Created GeoPointField in documents.py loc1 = fields.GeoPointField(attr=‘type_to_string’)

Now when I run the query s1 = LocationDocument.search().filter( ‘geo_distance’, distance=‘1000m’, loc1={“lat”: “40”, “lon”: “-74”} )
s1 = s1.execute()

I get error here. Any help where I am going wrong.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
honzakralcommented, Aug 12, 2019

This looks like your index wasn’t created with proper mappings in place, you need to explicitly create the index before indexing any data into it.

In elasticsearch dsl you do it by calling the init() classmethod on your Document subclass.

Hope this helps!

0reactions
prayag1740commented, Aug 12, 2019

RequestError: RequestError(400, ‘search_phase_execution_exception’, ‘failed to find geo_point field [loc1]’)

Read more comments on GitHub >

github_iconTop Results From Across the Web

ElasticSearch QueryParsingException failed to find geo_point ...
But when I try to run this query, the elasticsearch.log pops up with an error: [locations] failed to find geo_point field [coordinates].
Read more >
Failed to find geo_point field " + fieldName + " - Opster
A detailed guide on how to resolve errors related to "failed to find geo_point field " + fieldName + ""
Read more >
Failed to find geo_point field [destination.geo.location]
Hello everyone, I am having some problems with geo.location showing up on that maps with errors. This is my errors" query_shard_exception at ...
Read more >
Geospatial Support in ElasticSearch - Baeldung
Geo-point field type accepts latitude-longitude pairs that can be used to: Find points within a certain distance of central point; Find points ...
Read more >
Not able to query geo_point field, even though in my mapping ...
... ID on the location field I get an error saying failed to find geo_point field [answers.BAqyR5EEaEPCsMPocHYs.location]". This is my query
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found