Skip to content

Commit

Permalink
fix(readme): add documentation for custom synonyms files
Browse files Browse the repository at this point in the history
  • Loading branch information
missinglink committed Mar 26, 2018
1 parent f7afb85 commit d6def89
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,25 @@ Print a list of which plugins are installed and how to install any that are miss
node scripts/check_plugins.js;
```

#### user customizable synonyms files

You may provide your own custom synonyms by editing files in the `./synonyms/` directory.

```bash
$ ls -1 synonyms/custom_*
synonyms/custom_admin.txt
synonyms/custom_name.txt
synonyms/custom_street.txt
```

You must edit the files **before** running `create_index.js`, any changes made to the files will require you to drop and recreate the index before those synonyms are available.

Synonyms are only used at index-time. The filename contains the name of the elasticsearch field which the synonyms will apply. ie. `custom_name` will apply to the `name.*` fields, `custom_street` will apply to the `address_parts.name` field and `custom_admin` will apply to the `parent.*` fields.

see: https://github.com/pelias/schema/pull/273 for more info.

With great power comes great responsibility. Synonyms files are often used as a hammer when a scalpel is required. Please take care with their use and make maintainers aware that you are using custom synonyms when you open support tickets.

## NPM Module

The `pelias-schema` npm module can be found here:
Expand Down

0 comments on commit d6def89

Please sign in to comment.