photon icon indicating copy to clipboard operation
photon copied to clipboard

Excluding context in mappings breaks reindexing

Open simonpoole opened this issue 6 years ago • 3 comments

In mappings.json we exclude the context fields from the stored source document

"_source": {
    "excludes": [
        "context.*"
    ]
},

As the context fields are populated by the importer and updater, this implies that we can't reindex in situ (aka any change in the mappings or similar requires a reimport). I can see the space savings in doing this, but on the other hand it means that we can't evolve the mappings and related aspects of Photon in a "user"-friendly fashion.

simonpoole avatar Apr 15 '19 18:04 simonpoole

I would guess that the majority of users downloads the precomputed database provided by Graphhopper and rather repeat the download than reindexing the database. So I'd consider size a much more important argument.

lonvia avatar Apr 15 '19 19:04 lonvia

That is true now given that the choice isn't actually available, but given a lightweight way to update, I suspect that will change essentially immediately.

simonpoole avatar Apr 15 '19 21:04 simonpoole

I still doubt that the average user will do that. If you want to provide a development mode with a reindexable database, now that would be a different story.

Please also note the discussion in #291.

lonvia avatar Apr 15 '19 22:04 lonvia