Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(doc): Do not allow duplicate names to be created
While diagnosing an issue related to scoring, I discovered that WOF records are sometimes created with duplicate name values. While the pelias/model code can detect some of them (and more will be fixed with pelias/model#132), we should fix this issue at the source. Here's an example of what a document might look like today, before this PR: ``` { name: { default: [ 'Kansas City' ] }, phrase: { default: [ 'Kansas City', 'Kansas City' ] }, ... } ``` This can be fixed by checking each potential alternate name against the "primary" name value.
- Loading branch information