Skip to content

Commit

Permalink
Add simple pattern tokenizers
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia committed Feb 19, 2025
1 parent 60a9b3b commit 6ab5d18
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `POST _plugins/_security/api/internalusers/{username}` response `201` ([#810](https://github.com/opensearch-project/opensearch-api-specification/pull/810))
- Added `POST /_plugins/_ml/_execute/{algorithm_name}` ([#811](https://github.com/opensearch-project/opensearch-api-specification/pull/811))
- Added search suggester types ([#817](https://github.com/opensearch-project/opensearch-api-specification/pull/817))
- Added `SimplePatternTokenizer` and `SimplePatternSplitTokenizer` ([#820](https://github.com/opensearch-project/opensearch-api-specification/pull/820))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
Expand Down
28 changes: 28 additions & 0 deletions spec/schemas/_common.analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,8 @@ components:
- $ref: '#/components/schemas/WhitespaceTokenizer'
- $ref: '#/components/schemas/KuromojiTokenizer'
- $ref: '#/components/schemas/PatternTokenizer'
- $ref: '#/components/schemas/SimplePatternTokenizer'
- $ref: '#/components/schemas/SimplePatternSplitTokenizer'
- $ref: '#/components/schemas/IcuTokenizer'
- $ref: '#/components/schemas/SmartcnTokenizer'
CharGroupTokenizer:
Expand Down Expand Up @@ -1831,6 +1833,32 @@ components:
type: string
required:
- type
SimplePatternTokenizer:
allOf:
- $ref: '#/components/schemas/TokenizerBase'
- type: object
properties:
type:
type: string
enum:
- simple_pattern
pattern:
type: string
required:
- type
SimplePatternSplitTokenizer:
allOf:
- $ref: '#/components/schemas/TokenizerBase'
- type: object
properties:
type:
type: string
enum:
- simple_pattern_split
pattern:
type: string
required:
- type
SmartcnTokenizer:
allOf:
- $ref: '#/components/schemas/TokenizerBase'
Expand Down

0 comments on commit 6ab5d18

Please sign in to comment.