[Photon] Import only the region
Hamminger, Maximilian
Maximilian.Hamminger at dermalog.com
Fri Oct 9 11:12:01 UTC 2020
The easiest and probably fastest way would be to only import the region
in the first place. For this, you could quickly spin up your own
nominatim instance and import just the UK. From this you could then
import the data to photon.
The UK as an extract is available for instance at geofabrik:
http://download.geofabrik.de/europe.html
On Thu, 2020-10-08 at 11:17 +0000, Edward Hibbert wrote:
> Thanks for Photon. It's great.
>
> I'd like to shrink the 130GB database down to just the UK (England,
> Scotland, Wales, Northern Ireland). This is in no way related to
> current political events.
>
> I came across this:
>
> https://github.com/komoot/photon/issues/175
>
> So I did this:
>
> root at photon:/photon# curl -X POST "
> http://localhost:9200/photon/place/_delete_by_query?pretty" -H
> 'Content-Type: application/json' -d' { "query": { "bool": {
> "must_not": { "match": { "collector.en.raw": { "query": "United
> Kingdom", "operator": "or", "analyzer": "index_raw" } } } } } }'
> {
> "_index" : "photon",
> "_type" : "place",
> "_id" : "_delete_by_query",
> "_version" : 3,
> "result" : "updated",
> "_shards" : {
> "total" : 2,
> "successful" : 1,
> "failed" : 0
> },
> "created" : false
> }
> root at photon:/photon# curl -XPUT "
> http://localhost:9200/photon/_settings?preserve_existing=true" -d '{
> "index.merge.policy.expunge_deletes_allowed" : "0" }'
> {"acknowledged":true}root at photon:/photon#
> root at photon:/photon# curl -XPUT "
> http://localhost:9200/photon/_settings?preserve_existing=true" -d '{
> "index.merge.policy.expunge_deletes_allowed" : "0" }'
> {"acknowledged":true}root at photon:/photon#
>
> That all looks successful, but the database size hasn't changed and
> it still finds Berlin.
>
> Is there something else which I should be doing?
________________________________
DERMALOG Identification Systems GmbH * Mittelweg 120, 20148 Hamburg, Germany
CEO/Managing Director: Günther Mull * Commercial Register: AG Hamburg HRB 69547
More information about the Photon
mailing list