From 39d8c7c33587a56d7c5ebee9989896f0ac2dac39 Mon Sep 17 00:00:00 2001 From: mbo57 <96461698+mbo57@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:25:32 +0900 Subject: [PATCH 1/2] Update synonym.md Signed-off-by: mbo57 <96461698+mbo57@users.noreply.github.com> --- _analyzers/token-filters/synonym.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_analyzers/token-filters/synonym.md b/_analyzers/token-filters/synonym.md index 296d5cd5db..a1dfff845d 100644 --- a/_analyzers/token-filters/synonym.md +++ b/_analyzers/token-filters/synonym.md @@ -19,7 +19,7 @@ Parameter | Required/Optional | Data type | Description `synonyms_path` | Either `synonyms` or `synonyms_path` must be specified | String | The file path to a file containing synonym rules (either an absolute path or a path relative to the config directory). `lenient` | Optional | Boolean | Whether to ignore exceptions when loading the rule configurations. Default is `false`. `format` | Optional | String | Specifies the format used to determine how OpenSearch defines and interprets synonyms. Valid values are:
- `solr`
- [`wordnet`](https://wordnet.princeton.edu/).
Default is `solr`. -`expand` | Optional | Boolean | Whether to expand equivalent synonym rules. Default is `false`.

For example:
If `synonyms` are defined as `"quick, fast"` and `expand` is set to `true`, then the synonym rules are configured as follows:
- `quick => quick`
- `quick => fast`
- `fast => quick`
- `fast => fast`

If `expand` is set to `false`, the synonym rules are configured as follows:
- `quick => quick`
- `fast => quick` +`expand` | Optional | Boolean | Whether to expand equivalent synonym rules. Default is `true`.

For example:
If `synonyms` are defined as `"quick, fast"` and `expand` is set to `true`, then the synonym rules are configured as follows:
- `quick => quick`
- `quick => fast`
- `fast => quick`
- `fast => fast`

If `expand` is set to `false`, the synonym rules are configured as follows:
- `quick => quick`
- `fast => quick` ## Example: Solr format From 9cc291dacd12b49856afca19b118980a8da673e3 Mon Sep 17 00:00:00 2001 From: mbo57 <96461698+mbo57@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:27:08 +0900 Subject: [PATCH 2/2] Update synonym-graph.md Signed-off-by: mbo57 <96461698+mbo57@users.noreply.github.com> --- _analyzers/token-filters/synonym-graph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_analyzers/token-filters/synonym-graph.md b/_analyzers/token-filters/synonym-graph.md index 75c7c79151..d8e763d1fc 100644 --- a/_analyzers/token-filters/synonym-graph.md +++ b/_analyzers/token-filters/synonym-graph.md @@ -19,7 +19,7 @@ Parameter | Required/Optional | Data type | Description `synonyms_path` | Either `synonyms` or `synonyms_path` must be specified | String | The file path to a file containing synonym rules (either an absolute path or a path relative to the config directory). `lenient` | Optional | Boolean | Whether to ignore exceptions when loading the rule configurations. Default is `false`. `format` | Optional | String | Specifies the format used to determine how OpenSearch defines and interprets synonyms. Valid values are:
- `solr`
- [`wordnet`](https://wordnet.princeton.edu/).
Default is `solr`. -`expand` | Optional | Boolean | Whether to expand equivalent synonym rules. Default is `false`.

For example:
If `synonyms` are defined as `"quick, fast"` and `expand` is set to `true`, then the synonym rules are configured as follows:
- `quick => quick`
- `quick => fast`
- `fast => quick`
- `fast => fast`

If `expand` is set to `false`, the synonym rules are configured as follows:
- `quick => quick`
- `fast => quick` +`expand` | Optional | Boolean | Whether to expand equivalent synonym rules. Default is `true`.

For example:
If `synonyms` are defined as `"quick, fast"` and `expand` is set to `true`, then the synonym rules are configured as follows:
- `quick => quick`
- `quick => fast`
- `fast => quick`
- `fast => fast`

If `expand` is set to `false`, the synonym rules are configured as follows:
- `quick => quick`
- `fast => quick` ## Example: Solr format