Skip to content

Commit

Permalink
Change elasticsearch to opensearch in synonyms.txt
Browse files Browse the repository at this point in the history
Signed-off-by: Harold Wang <[email protected]>
  • Loading branch information
harold-wang committed Mar 25, 2021
1 parent 3c49199 commit 85696aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void testSynonymsAnalysis() throws IOException {
indexAnalyzers = createTestAnalysis(idxSettings, settings, new CommonAnalysisPlugin()).indexAnalyzers;

match("synonymAnalyzer", "kimchy is the dude abides", "shay is the opensearch man!");
match("synonymAnalyzer_file", "kimchy is the dude abides", "shay is the elasticsearch man!");
match("synonymAnalyzer_file", "kimchy is the dude abides", "shay is the opensearch man!");
match("synonymAnalyzerWordnet", "abstain", "abstain refrain desist");
match("synonymAnalyzerWordnet_file", "abstain", "abstain refrain desist");
match("synonymAnalyzerWithsettings", "kimchy", "sha hay");
Expand All @@ -92,9 +92,9 @@ public void testSynonymWordDeleteByAnalyzer() throws IOException {
.put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT)
.put("path.home", createTempDir().toString())
.put("index.analysis.filter.synonym.type", "synonym")
.putList("index.analysis.filter.synonym.synonyms", "kimchy => shay", "dude => elasticsearch", "abides => man!")
.putList("index.analysis.filter.synonym.synonyms", "kimchy => shay", "dude => opensearch", "abides => man!")
.put("index.analysis.filter.stop_within_synonym.type", "stop")
.putList("index.analysis.filter.stop_within_synonym.stopwords", "kimchy", "elasticsearch")
.putList("index.analysis.filter.stop_within_synonym.stopwords", "kimchy", "opensearch")
.put("index.analysis.analyzer.synonymAnalyzerWithStopSynonymBeforeSynonym.tokenizer", "whitespace")
.putList("index.analysis.analyzer.synonymAnalyzerWithStopSynonymBeforeSynonym.filter", "stop_within_synonym","synonym")
.build();
Expand All @@ -113,9 +113,9 @@ public void testExpandSynonymWordDeleteByAnalyzer() throws IOException {
.put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT)
.put("path.home", createTempDir().toString())
.put("index.analysis.filter.synonym_expand.type", "synonym")
.putList("index.analysis.filter.synonym_expand.synonyms", "kimchy, shay", "dude, elasticsearch", "abides, man!")
.putList("index.analysis.filter.synonym_expand.synonyms", "kimchy, shay", "dude, opensearch", "abides, man!")
.put("index.analysis.filter.stop_within_synonym.type", "stop")
.putList("index.analysis.filter.stop_within_synonym.stopwords", "kimchy", "elasticsearch")
.putList("index.analysis.filter.stop_within_synonym.stopwords", "kimchy", "opensearch")
.put("index.analysis.analyzer.synonymAnalyzerExpandWithStopBeforeSynonym.tokenizer", "whitespace")
.putList("index.analysis.analyzer.synonymAnalyzerExpandWithStopBeforeSynonym.filter", "stop_within_synonym","synonym_expand")
.build();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kimchy => shay
dude => elasticsearch
dude => opensearch
abides => man!

0 comments on commit 85696aa

Please sign in to comment.