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
Storing the location information from Mongo to ElasticSearch #220
Comments
@black-star
|
example doc for containing location information: Command for mongo-connector |
@black-star
I'm not sure if it's important or not to create the index manually on Elasticsearch before running the connector, but the geo-point documentation states that a dynamic mapping, which Mongo Connector creates, is not sufficient for Elasticsearch to detect points. Creating the index manually on Elasticsearch is a necessary step. I'm also not sure if and when changing the type of a field within a mapping creates the necessary index on that field for geo queries, so you might need to reload your data after you've created the appropriate mapping. |
@llvtt
|
Mongo Connector only creates a default, dynamic mapping when the first document is inserted into an index. Anything more complicated than that should be done manually before running Mongo Connector. |
Longitude must be stored first in MongoDB and latitude must be first in ElasticSearch. How do you deal with that? |
Nevermind, I just noticed the recent versions of ElasticSearch allow longitude first when an array is provided |
I have latitude and longitude information as field but when i try to move it to elastic search it is considered as number rather than location.
please refer this question
http://stackoverflow.com/questions/29033305/geo-location-from-mongodb-to-elasticsearch
I have tried to change the data type to location using below post call.
http://localhost:9200/database/database.table/_mapping
{
"database": {
"mappings": {
"database.table": {
"properties": {
"geoip.location": {
"type": "geo_point"
}
}
}
}
}
}
The text was updated successfully, but these errors were encountered: