Provide access to _type in 5.x indices#83195
Conversation
|
@elasticmachine run elasticsearch-ci/rest-compatibility (unrelated failure, as usual these days) |
|
Pinging @elastic/es-search (Team:Search) |
romseygeek
left a comment
There was a problem hiding this comment.
LGTM, I left one question and one nitpick.
server/src/main/java/org/elasticsearch/index/mapper/LegacyTypeFieldMapper.java
Outdated
Show resolved
Hide resolved
.../repository-old-versions/src/test/java/org/elasticsearch/oldrepos/OldRepositoryAccessIT.java
Show resolved
Hide resolved
|
Thanks @romseygeek! |
|
@ywelsch could you give the background on why we're restoring support for searching and returning |
|
Sure, it's for accessing archival data (#81210) where users will have the ability to access their older raw data. Here, _type is part of the "original data" that the user provided to the system (but isn't stored in _source, similar to _id), so this PR adds support for them to be able to retrieve this data and to run basic queries on it. |
|
Got it, so we're adding some minimal handling for |
Correct. This is handled quite nicely in newer ES versions, which do that (top-level key) automatically for any metadata mapper.
Interesting. This interacts badly, as the |
Allows running queries against _type on 5.x indices as well as returning _type in search results.
Relates #81210