GeoPoint not added to mapping
See original GitHub issueclass User(DocType):
location = GeoPoint()
session_id = Text()
class Meta:
index = 'searching_users'
dynamic = MetaField('strict')`
I have this class definition, but when I create a user like
user = User()
user.session_id = sid
user.location = [lat, lon]
user.save()`
I am getting
{ "searching_users":{ "mappings":{ "doc":{ "properties":{ "location":{ "type":"long" }, "session_id":{ "type":"text", "fields":{ "keyword":{ "type":"keyword", "ignore_above":256 } } } } } } } }
Any thing to check for why this won’t create a type geo_point
?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Survey 123 Geopoint not appearing as location in map viewer
I have created a survey form with survey 123 connect which for one asks the user to supply the location of the project...
Read more >Geopoints—ArcGIS Survey123 | Documentation
You can add multiple geopoint, geotrace, or geoshape questions to a survey ... When capturing responses using a map, not all features of...
Read more >node.js - Mapping geopoint doesn't work in ElasticSearch
I add callback for putMapping method and I receive an error. [illegal_argument_exception] Types cannot be provided in put mapping requests, ...
Read more >Geo-point fields in nested mappings not accessible in Maps
My index has a nested definition that includes a property of type geo-point. I can see it in Discover but it is not...
Read more >Geographic point vector - MATLAB - MathWorks
If structArray contains the field Lat , and does not contain a field ... Dynamic properties are new features that are added to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@appli-intramuros unfortunately that is not an option, we would have to check before any write operation which would make it prohibitively expensive.
What i can recommend is to disable automatic index creation in elasticsearch by setting
action.auto_create_index
to false and then attempt to write to a non existent index will fail, thus preventing nasty surprises.Hope this helps!
As browsing this issue, I saw a mistake according to the Elastic documentation in this block of code:
The correct array setting according to https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html for location is :
user.location = [lon, lat]
–> Geo-point expressed as an array with the format: [ lon, lat]
My 2 cents