Rework norms parameters for 5.0. #16987

Changes:
 - no more option to configure eager/lazy loading of the norms (useless now
   that orms are disk-based)
 - only the `string`, `text` and `keyword` fields support the `norms` setting
 - the `norms` setting takes a boolean that decides whether norms should be
   stored in the index but old options are still supported to give users time
   to upgrade
 - setting a `boost` no longer implicitely enables norms (for new indices only,
   this is still needed for old indices)
This commit is contained in:
Adrien Grand 2016-02-26 16:25:05 +01:00
parent 5596e31068
commit c50c5a52d5
28 changed files with 236 additions and 173 deletions

View file

@ -247,6 +247,25 @@ def generate_index(client, version, index_name):
}
}
mappings['norms'] = {
'properties': {
'string_with_norms_disabled': {
'type': 'string',
'norms': {
'enabled': False
}
},
'string_with_norms_enabled': {
'type': 'string',
'index': 'not_analyzed',
'norms': {
'enabled': True,
'loading': 'eager'
}
}
}
}
mappings['doc'] = {
'properties': {
'string': {