cedardevs / onestop

OneStop is a data discovery system being built by CIRES researchers on a grant from the NOAA National Centers for Environmental Information. We welcome contributions from the community!
GNU General Public License v2.0
44 stars 20 forks source link

Mapping before indexing comparison doesn't look at nested fields #1268

Closed ajakz closed 4 years ago

ajakz commented 4 years ago

Summary

Prior to indexing in the Search and A&E indices, the fields for the existing ES mapping are compared to the available content. Only fields that are in the mapping are indexed and excess fields are dropped prior to sending to ES. This keeps ES from throwing errors on indexing but doesn't work on objects/nested fields.

Tasks

Updated tasks:

ajakz commented 4 years ago

Updated tasks:

zebdelk commented 4 years ago

Helping with testing

dneufeldcu commented 4 years ago

Throw error when application mappings don't match ES types.

dneufeldcu commented 4 years ago

Zeb is working through manual test process and documentation of the error thrown.

dneufeldcu commented 4 years ago

@zebdelk Please update this story with references to code changes and documentation to date

dneufeldcu commented 4 years ago

See #1360

erinreeves commented 4 years ago

Remove field checking from TransformationUtils accomplished by other PR by using POJO's

erinreeves commented 4 years ago

Manual notes: basically, start the app (use kibana or similar to verify mappings), then go make those or similar kinds of edits to the mappings in elastic-common/src/main/resources/mappings, then restart app (or let skaffold do it depending on how you run it)

erinreeves commented 4 years ago

It gives me some pause that it is so hard to test this one scenario, but it's so hard to inject our own mapping files. It's always been my feeling, and I've read a few places, that if something is difficult/impossible to test that can be a sign the code should be changed. That's a really tight coupling. I was thinking you could make a backup and copy your own version to those mapping files but I'm unsure how long to wait or know when they have been reloaded to have the test then continue. It feels like a lot of work for such a tiny thing.

Chatted with Zeb and concluded to do this right would be almost more confusing.