Closed orangejulius closed 5 years ago
While it would be really nice to merge this now and cut our schema size down considerably, we should wait until https://github.com/pelias/pelias/issues/461 is complete so that we can set the document name to the new default (_doc
). It isn't a valid value in ES2, so we would have to change it again later.
This PR is old, but we should still merge it eventually. However, before doing so, we will need to fix https://github.com/pelias/pelias/issues/672 (probably by storing the Pelias GID in the Elasticsearch _id_
field).
Otherwise, removing our use of the Elasticsearch _type
field would make that problem even worse.
I just did some refreshing of this PR. It's good to go, however we should wait a bit until https://github.com/pelias/model/pull/121 has had a chance to make its way out.
Just did some final testing of this PR. It appears to work great, however it's a breaking change as far as the importers are concerned, as many of their functional tests are expecting certain values for the _type
field, which will change with this PR.
The commit has been updated to be a breaking change, and so this is finally good to merge after over a year!
Currently, we create numerous Elasticsearch types, corresponding to different layers. All the types are identical, so they don't really serve any value.
In Elasticsearch 6 mapping types will go away. The sooner we can remove our minimal usage of types, the easier that transition will be.
Its possible that this will give us a performance benefit right away, although it probably won't. It will simplify our code a bit though!
Note: This PR can be merged right away. Later on, we can merge https://github.com/pelias/schema/pull/293 to enforce a single type everywhere.
Connects https://github.com/pelias/pelias/issues/719