Closed
Description
Fields with the same name in different types in the same index should have the same mapping. Previously, this has been advised as "best practice", but relying on advice has proved insufficient (see #4081 for the many issues that have resulted from allowing conflicting field definitions). Instead we need to enforce this in the API.
This issue (which replaces #4081) is a meta issue listing all of the changes that need to be made:
- Move field mappings to the index level internally #8871 - Internally, field mappings should be stored at the index level, rather than at the type level. Types are essentially a way of grouping fields. While the mapping APIs will not change, an exception will be thrown if an attempt is made to map a field in one type in a way that conflicts with the mapping of a field with same name in another type. The _parent field is the one exception - this field will remain at the type level.Require the full path (without type) for field lookups #8872 Always require the full path for field names (wildcards still allowed), and remove the ability to prepend the full path with the
_type
.Remove type-levelanalyzer
,index_analyzer
,search_analyzer
#8874 Remove type-levelanalyzer
,search_analyzer
,index_analyzer
settings.Remove _analyzer #9279 Remove per-document_analyzer
Mappings: disallow exotic options on meta fields #8143 Remove the ability to change the mapping for_uid
,_id
,_index
,_type
,_field_names
.Deprecate extracting _routing and _id from document fields #6730 Deprecate extracting_routing
and_id
from document fields, but should still be possible to set_routing
to required.Mappings: Ensure that reindexing is always possible #8142 Always store_timestamp
,_ttl
,_routing
,_parent
as these are required for reindexing.Mappings: Ensure that reindexing is always possible #8142 Should we also always require that the_source
field should be stored? Disabling source prevents reindexing, updates, and out-of-the-box highlighting. Perhaps with the new compression options (Addbest_compression
option for indices #8863), the ability to disable the_source
field is less useful?Remove the_boost
field #8875 Remove the_boost
field (deprecated in v1.0.0.RC1).Remove the ability to delete mappings #8877 Remove the ability to delete mappings.Dealing with incompatible mapping changes #9443 Allow the user to upgrade mappings removing old settings without requiring reindexing (where possible)Throw an exception if field mapping is invalid #9927 Throw an exception if field mappings is invalid
Alternatives:
- Fields with different types can be renamed to distinguish their purpose, eg
login_name
vslogin_date
. - Different types can be separated into different indices.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
analyzer
,index_analyzer
,search_analyzer
#8874_boost
field #8875_size
field #8876index_name
andpath
#667763 remaining items