Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: AntonEliatra <[email protected]>
  • Loading branch information
AntonEliatra and natebower authored Nov 12, 2024
1 parent 6d2089b commit 719ef66
Show file tree
Hide file tree
Showing 36 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/arabic.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `arabic` analyzer is built using the following components:
- decimal_digit
- stop (Arabic)
- normalization (Arabic)
- keywords
- keyword
- stemmer (Arabic)

## Custom Arabic analyzer
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/armenian.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ The `armenian` analyzer is built using the following components:
- Token filters:
- lowercase
- stop (Armenian)
- keywords
- keyword
- stemmer (Armenian)

## Custom Armenian analyzer

You can create custom Armenian analyzer using the following command:
You can create a custom Armenian analyzer using the following command:

```json
PUT /armenian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/basque.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ The `basque` analyzer is built using the following components:
- Token filters:
- lowercase
- stop (Basque)
- keywords
- keyword
- stemmer (Basque)

## Custom Basque analyzer

You can create custom Basque analyzer using the following command:
You can create a custom Basque analyzer using the following command:

```json
PUT /basque-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/bengali.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ The `bengali` analyzer is built using the following components:
- indic_normalization
- normalization (Bengali)
- stop (Bengali)
- keywords
- keyword
- stemmer (Bengali)

## Custom Bengali analyzer

You can create custom Bengali analyzer using the following command:
You can create a custom Bengali analyzer using the following command:

```json
PUT /bengali-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/brazilian.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ The `brazilian` analyzer is built using the following components:
- Token filters:
- lowercase
- stop (Brazilian)
- keywords
- keyword
- stemmer (Brazilian)

## Custom Brazilian analyzer

You can create custom Brazilian analyzer using the following command:
You can create a custom Brazilian analyzer using the following command:

```json
PUT /brazilian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/bulgarian.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ The `bulgarian` analyzer is built using the following components:
- Token filters:
- lowercase
- stop (Bulgarian)
- keywords
- keyword
- stemmer (Bulgarian)

## Custom Bulgarian analyzer

You can create custom Bulgarian analyzer using the following command:
You can create a custom Bulgarian analyzer using the following command:

```json
PUT /bulgarian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/catalan.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ The `catalan` analyzer is built using the following components:
- elision (Catalan)
- lowercase
- stop (Catalan)
- keywords
- keyword
- stemmer (Catalan)

## Custom Catalan analyzer

You can create custom Catalan analyzer using the following command:
You can create a custom Catalan analyzer using the following command:

```json
PUT /catalan-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/cjk.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `cjk` analyzer is built using the following components:

## Custom CJK analyzer

You can create custom CJK analyzer using the following command:
You can create a custom CJK analyzer using the following command:

```json
PUT /cjk-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/czech.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `czech` analyzer is built using the following components:

## Custom Czech analyzer

You can create custom Czech analyzer using the following command:
You can create a custom Czech analyzer using the following command:

```json
PUT /czech-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/danish.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `danish` analyzer is built using the following components:

## Custom Danish analyzer

You can create custom Danish analyzer using the following command:
You can create a custom Danish analyzer using the following command:

```json
PUT /danish-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/dutch.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The `dutch` analyzer is built using the following components:

## Custom Dutch analyzer

You can create custom Dutch analyzer using the following command:
You can create a custom Dutch analyzer using the following command:

```json
PUT /dutch-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/english.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The `english` analyzer is built using the following components:

## Custom English analyzer

You can create custom English analyzer using the following command:
You can create a custom English analyzer using the following command:

```json
PUT /english-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/estonian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `estonian` analyzer is built using the following components:

## Custom Estonian analyzer

You can create custom Estonian analyzer using the following command:
You can create a custom Estonian analyzer using the following command:

```json
PUT /estonian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/finnish.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `finnish` analyzer is built using the following components:

## Custom Finnish analyzer

You can create custom Finnish analyzer using the following command:
You can create a custom Finnish analyzer using the following command:

```json
PUT /finnish-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/french.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The `french` analyzer is built using the following components:

## Custom French analyzer

You can create custom French analyzer using the following command:
You can create a custom French analyzer using the following command:

```json
PUT /french-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/galician.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `galician` analyzer is built using the following components:

## Custom Galician analyzer

You can create custom Galician analyzer using the following command:
You can create a custom Galician analyzer using the following command:

```json
PUT /galician-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/german.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The `german` analyzer is built using the following components:

## Custom German analyzer

You can create custom German analyzer using the following command:
You can create a custom German analyzer using the following command:

```json
PUT /german-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/greek.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `greek` analyzer is built using the following components:

## Custom Greek analyzer

You can create custom Greek analyzer using the following command:
You can create a custom Greek analyzer using the following command:

```json
PUT /greek-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/hindi.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The `hindi` analyzer is built using the following components:

## Custom Hindi analyzer

You can create custom Hindi analyzer using the following command:
You can create a custom Hindi analyzer using the following command:

```json
PUT /hindi-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/hungarian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `hungarian` analyzer is built using the following components:

## Custom Hungarian analyzer

You can create custom Hungarian analyzer using the following command:
You can create a custom Hungarian analyzer using the following command:

```json
PUT /hungarian-index
Expand Down
12 changes: 6 additions & 6 deletions _analyzers/language-analyzers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ redirect_from:
# Language analyzers

OpenSearch supports the following language analyzers:
`arabic`, `armenian`, `basque`, `bengali`, `brazilian`, `bulgarian`, `catalan`, `czech`, `danish`, `dutch`, `english`, `estonian`, `finnish`, `french`, `galician`, `german`, `greek`, `hindi`, `hungarian`, `indonesian`, `irish`, `italian`, `latvian`, `lithuanian`, `norwegian`, `persian`, `portuguese`, `romanian`, `russian`, `sorani`, `spanish`, `swedish`, `turkish`, and `thai`.
`arabic`, `armenian`, `basque`, `bengali`, `brazilian`, `bulgarian`, `catalan`, `czech`, `danish`, `dutch`, `english`, `estonian`, `finnish`, `french`, `galician`, `german`, `greek`, `hindi`, `hungarian`, `indonesian`, `irish`, `italian`, `latvian`, `lithuanian`, `norwegian`, `persian`, `portuguese`, `romanian`, `russian`, `sorani`, `spanish`, `swedish`, `thai`, and `turkish`.

To use the analyzer when you map an index, specify the value within your query. For example, to map your index with the French language analyzer, specify the `french` value for the analyzer field:
To use an analyzer when you map an index, specify the value in your query. For example, to map your index with the French language analyzer, specify the `french` value in the analyzer field:

```json
"analyzer": "french"
```

#### Example request

The following query specifies index `my-index` with `content` field configured as multi-field and sub-field named `french` is configured with `french` language analyzer:
The following query specifies an index `my-index` with the `content` field configured as multi-field, and a sub-field named `french` is configured with the `french` language analyzer:

```json
PUT my-index
Expand All @@ -44,7 +44,7 @@ PUT my-index
```
{% include copy-curl.html %}

Default `french` analyzer can also be configured for the entire index using the following query:
The default `french` analyzer can also be configured for the entire index using the following query:

```json
PUT my-index
Expand Down Expand Up @@ -77,7 +77,7 @@ PUT my-index

## Stem exclusion

You can apply stem exclusion to any language analyzer by providing a list of lowercase words that should be excluded from stemming. Internally, OpenSearch uses the `keyword_marker` token filter to mark these words as keywords, ensuring they are not stemmed.
You can apply stem exclusion to any language analyzer by providing a list of lowercase words that should be excluded from stemming. Internally, OpenSearch uses the `keyword_marker` token filter to mark these words as keywords, ensuring that they are not stemmed.

## Stem exclusion example

Expand All @@ -103,7 +103,7 @@ PUT index_with_stem_exclusion_english_analyzer

## Stem exclusion with custom analyzers

All language analyzers consist of tokenizers and token filters specific to the particular language. If you want to implement a custom version of the language analyzer with stem exclusion, you need to configure the `keyword_marker` token filter and list the words excluded from stemming in the `keywords` parameter:
All language analyzers consist of tokenizers and token filters specific to a particular language. If you want to implement a custom version of the language analyzer with stem exclusion, you need to configure the `keyword_marker` token filter and list the words excluded from stemming in the `keywords` parameter:

```json
PUT index_with_keyword_marker_analyzer
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/indonesian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `indonesian` analyzer is built using the following components:

## Custom Indonesian analyzer

You can create custom Indonesian analyzer using the following command:
You can create a custom Indonesian analyzer using the following command:

```json
PUT /hungarian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/irish.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The `irish` analyzer is built using the following components:

## Custom Irish analyzer

You can create custom Irish analyzer using the following command:
You can create a custom Irish analyzer using the following command:

```json
PUT /irish-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/italian.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The `italian` analyzer is built using the following components:

## Custom Italian analyzer

You can create custom Italian analyzer using the following command:
You can create a custom Italian analyzer using the following command:

```json
PUT /italian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/latvian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `latvian` analyzer is built using the following components:

## Custom Latvian analyzer

You can create custom Latvian analyzer using the following command:
You can create a custom Latvian analyzer using the following command:

```json
PUT /italian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/lithuanian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `lithuanian` analyzer is built using the following components:

## Custom Lithuanian analyzer

You can create custom Lithuanian analyzer using the following command:
You can create a custom Lithuanian analyzer using the following command:

```json
PUT /lithuanian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/norwegian.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The `norwegian` analyzer is built using the following components:

## Custom Norwegian analyzer

You can create custom Norwegian analyzer using the following command:
You can create a custom Norwegian analyzer using the following command:

```json
PUT /norwegian-index
Expand Down
2 changes: 1 addition & 1 deletion _analyzers/language-analyzers/persian.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The `persian` analyzer is built using the following components:

## Custom Persian analyzer

You can create custom Persian analyzer using the following command:
You can create a custom Persian analyzer using the following command:

```json
PUT /persian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/portuguese.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ The `portuguese` analyzer is built using the following components:

- Tokenizer: `standard`

- Token Filters:
- Token filters:
- lowercase
- stop (Portuguese)
- keyword
- stemmer (Portuguese)

## Custom Portuguese analyzer

You can create custom Portuguese analyzer using the following command:
You can create a custom Portuguese analyzer using the following command:

```json
PUT /portuguese-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/romanian.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ The `romanian` analyzer is built using the following components:

- Tokenizer: `standard`

- Token Filters:
- Token filters:
- lowercase
- stop (Romanian)
- keyword
- stemmer (Romanian)

## Custom Romanian analyzer

You can create custom Romanian analyzer using the following command:
You can create a custom Romanian analyzer using the following command:

```json
PUT /romanian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/russian.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ The `russian` analyzer is built using the following components:

- Tokenizer: `standard`

- Token Filters:
- Token filters:
- lowercase
- stop (Russian)
- keyword
- stemmer (Russian)

## Custom Russian analyzer

You can create custom Russian analyzer using the following command:
You can create a custom Russian analyzer using the following command:

```json
PUT /russian-index
Expand Down
4 changes: 2 additions & 2 deletions _analyzers/language-analyzers/sorani.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The `sorani` analyzer is built using the following components:

- Tokenizer: `standard`

- Token Filters:
- Token filters:
- normalization (Sorani)
- lowercase
- decimal_digit
Expand All @@ -62,7 +62,7 @@ The `sorani` analyzer is built using the following components:

## Custom Sorani analyzer

You can create custom Sorani analyzer using the following command:
You can create a custom Sorani analyzer using the following command:

```json
PUT /sorani-index
Expand Down
Loading

0 comments on commit 719ef66

Please sign in to comment.