-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add phone number analysis plugin (#609)
this is part of opensearch-project/OpenSearch#11326. the actual implementation was done opensearch-project/OpenSearch#15915. see the commit message on the PR for further details. the new test group `analysis` has been added so that it can later be extended with all other optional language analyzers (which are currently also not covered). Signed-off-by: Ralph Ursprung <Ralph.Ursprung@avaloq.com>
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/plugins/analysis/indices/analyze/analyzer/phone.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
$schema: ../../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test /{index}/_analyze for the phone and phone-search analyzers. | ||
prologues: | ||
- path: /example-phone | ||
method: PUT | ||
request: | ||
payload: | ||
settings: | ||
index: | ||
analysis: | ||
analyzer: | ||
phone-ch: | ||
type: phone | ||
phone-region: CH | ||
phone-search-ch: | ||
type: phone-search | ||
phone-region: CH | ||
epilogues: | ||
- path: /example-phone | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Analyze phone number. | ||
path: /{index}/_analyze | ||
method: POST | ||
parameters: | ||
index: example-phone | ||
request: | ||
payload: | ||
analyzer: phone-ch | ||
text: '+41 60 555 12 34' | ||
response: | ||
status: 200 | ||
payload: | ||
tokens: | ||
- token: '+41 60 555 12 34' | ||
- token: '6055512' |