(indexName, sourceDirectory)
| 411 | } |
| 412 | |
| 413 | async function loadRecords(indexName, sourceDirectory) { |
| 414 | const filePath = path.join(sourceDirectory, `${indexName}-records.json`) |
| 415 | const payload = await fs.readFile(filePath) |
| 416 | return JSON.parse(payload) |
| 417 | } |
| 418 | |
| 419 | function getSnowballLanguage(language) { |
| 420 | // Based on https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-snowball-tokenfilter.html |