enrise-estools
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "enrise-estools", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Elasticsearch tooling functions for managing indices and aliases.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -96,3 +96,3 @@ 'use strict'; | ||
filter.synonyms = synonyms; | ||
filter.synonyms = synonyms || filter.synonyms; | ||
} | ||
@@ -99,0 +99,0 @@ |
@@ -343,3 +343,23 @@ 'use strict'; | ||
}); | ||
it('leaves the synonyms untouched when no new synonyms are provided (mapping received from file)', () => { | ||
helpers.prepareSynonymsMapping(mapping1, {}); | ||
chai.expect(mapping1.settings.analysis.filter).to.deep.equal({ | ||
synonyms: {synonyms: ['']}, | ||
pre_synonyms: {synonyms: ['']}, | ||
other_filter: {} | ||
}); | ||
}); | ||
it('leaves the synonyms untouched when no new synonyms are provided (mapping received from the index)', () => { | ||
helpers.prepareSynonymsMapping(mapping2, {}); | ||
chai.expect(mapping2.settings.index.analysis.filter).to.deep.equal({ | ||
synonyms: {synonyms: ['']}, | ||
pre_synonyms: {synonyms: ['']}, | ||
other_filter: {} | ||
}); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35536
741