-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mappings: Deprecate index_name
.
#7057
Conversation
@@ -159,6 +157,10 @@ public T add(Mapper.Builder builder) { | |||
|
|||
@Override | |||
public Y build(BuilderContext context) { | |||
if (pathType != ContentPath.Type.FULL && context.indexCreatedVersion().onOrAfter(Version.V_1_4_0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should do
path == ContentPath.Type.JUST_NAME
instead of pathType != ContentPath.Type.FULL
In case in the future we want to add a new option...
Left some comments. Hope this helps. |
@@ -63,4 +73,24 @@ public void testEmptyArrayProperties() throws Exception { | |||
.endObject().endObject().string(); | |||
createIndex("test").mapperService().documentMapperParser().parse(mapping); | |||
} | |||
|
|||
public void testPathJustName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add @test annotation?
I left a couple of comments. Maybe we can also add a small integration test that checks if either index_name of path with just_name is used on indices before 1.4.0 and after? |
Closed by #9570 |
Close #6677