I am an elasticsearch noob and am trying to use the wikivoyage index dump (which uses elasticsearch 5.5.2) provided by wikipedia to do some geo queries. After bulk uploading their index in my local instance of elastic I see this in the mappings of the index that gets auto generated
"coordinates" : {
"properties" : {
"coord" : {
"properties" : {
"lat" : {"type" : "float"},
"lon" : {"type" : "float"
}
}
},
"dim" : {
"type" : "long"
},
"globe" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"primary" : {
"type" : "boolean"
}
}
},
Do I need to do some remapping of the current coordinate field of my index? It looks like I need to create a new geopoint type field or maybe modify the coordinate field to use this geopoint type. Is that right? And any help on how I do that would be greatly appreciated. Thank!
Thanks! This is what I ended up doing. It wasn't clear from the docs - after a mapping is autogenerated (via bulk import of data) how to update/fix the mapping.
For something like the full wikipedia index import (where I don't have any prior idea what the fields and types are - and they seem to vary from dump to dump) looks like the process is - create index - figure out what needs changing in mappings - delete index - create new index with new mappings.
I am using their wikivoyage dump enwikivoyage-20180625-cirrussearch-content.json.gz from here
They do have an api to retrieve the settings and mappings https://en.wikivoyage.org/w/api.php?action=cirrus-mapping-dump&format=json&formatversion=2 but it seem to be of 2.x format. The version of the dump as far as i can tell is 5.5.2. I have posted a question on their forum but haven't heard anything back. Trying to use the 2.x mappings gives me a bazillion errors. So I am plodding my way through it trying to figure out which objects map to 5.5.2.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.