mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
* Default include_type_name to false for get and put mappings. * Default include_type_name to false for get field mappings. * Add a constant for the default include_type_name value. * Default include_type_name to false for get and put index templates. * Default include_type_name to false for create index. * Update create index calls in REST documentation to use include_type_name=true. * Some minor clean-ups around the get index API. * In REST tests, use include_type_name=true by default for index creation. * Make sure to use 'expression == false'. * Clarify the different IndexTemplateMetaData toXContent methods. * Fix FullClusterRestartIT#testSnapshotRestore. * Fix the ml_anomalies_default_mappings test. * Fix GetFieldMappingsResponseTests and GetIndexTemplateResponseTests. We make sure to specify include_type_name=true during xContent parsing, so we continue to test the legacy typed responses. XContent generation for the typeless responses is currently only covered by REST tests, but we will be adding unit test coverage for these as we implement each typeless API in the Java HLRC. This commit also refactors GetMappingsResponse to follow the same appraoch as the other mappings-related responses, where we read include_type_name out of the xContent params, instead of creating a second toXContent method. This gives better consistency in the response parsing code. * Fix more REST tests. * Improve some wording in the create index documentation. * Add a note about types removal in the create index docs. * Fix SmokeTestMonitoringWithSecurityIT#testHTTPExporterWithSSL. * Make sure to mention include_type_name in the REST docs for affected APIs. * Make sure to use 'expression == false' in FullClusterRestartIT. * Mention include_type_name in the REST templates docs.
99 lines
2.3 KiB
Plaintext
99 lines
2.3 KiB
Plaintext
[[analysis-phonetic]]
|
|
=== Phonetic Analysis Plugin
|
|
|
|
The Phonetic Analysis plugin provides token filters which convert tokens to
|
|
their phonetic representation using Soundex, Metaphone, and a variety of other
|
|
algorithms.
|
|
|
|
:plugin_name: analysis-phonetic
|
|
include::install_remove.asciidoc[]
|
|
|
|
|
|
[[analysis-phonetic-token-filter]]
|
|
==== `phonetic` token filter
|
|
|
|
The `phonetic` token filter takes the following settings:
|
|
|
|
`encoder`::
|
|
|
|
Which phonetic encoder to use. Accepts `metaphone` (default),
|
|
`double_metaphone`, `soundex`, `refined_soundex`, `caverphone1`,
|
|
`caverphone2`, `cologne`, `nysiis`, `koelnerphonetik`, `haasephonetik`,
|
|
`beider_morse`, `daitch_mokotoff`.
|
|
|
|
`replace`::
|
|
|
|
Whether or not the original token should be replaced by the phonetic
|
|
token. Accepts `true` (default) and `false`. Not supported by
|
|
`beider_morse` encoding.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
PUT phonetic_sample?include_type_name=true
|
|
{
|
|
"settings": {
|
|
"index": {
|
|
"analysis": {
|
|
"analyzer": {
|
|
"my_analyzer": {
|
|
"tokenizer": "standard",
|
|
"filter": [
|
|
"lowercase",
|
|
"my_metaphone"
|
|
]
|
|
}
|
|
},
|
|
"filter": {
|
|
"my_metaphone": {
|
|
"type": "phonetic",
|
|
"encoder": "metaphone",
|
|
"replace": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
GET phonetic_sample/_analyze
|
|
{
|
|
"analyzer": "my_analyzer",
|
|
"text": "Joe Bloggs" <1>
|
|
}
|
|
--------------------------------------------------
|
|
// CONSOLE
|
|
|
|
<1> Returns: `J`, `joe`, `BLKS`, `bloggs`
|
|
|
|
|
|
[float]
|
|
===== Double metaphone settings
|
|
|
|
If the `double_metaphone` encoder is used, then this additional setting is
|
|
supported:
|
|
|
|
`max_code_len`::
|
|
|
|
The maximum length of the emitted metaphone token. Defaults to `4`.
|
|
|
|
[float]
|
|
===== Beider Morse settings
|
|
|
|
If the `beider_morse` encoder is used, then these additional settings are
|
|
supported:
|
|
|
|
`rule_type`::
|
|
|
|
Whether matching should be `exact` or `approx` (default).
|
|
|
|
`name_type`::
|
|
|
|
Whether names are `ashkenazi`, `sephardic`, or `generic` (default).
|
|
|
|
`languageset`::
|
|
|
|
An array of languages to check. If not specified, then the language will
|
|
be guessed. Accepts: `any`, `common`, `cyrillic`, `english`, `french`,
|
|
`german`, `hebrew`, `hungarian`, `polish`, `romanian`, `russian`,
|
|
`spanish`.
|