Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jul 28, 2014

Close #6677

@jpountz jpountz added the review label Jul 28, 2014
@@ -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)) {
Copy link
Member

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...

@dadoonet
Copy link
Member

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() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @test annotation?

@martijnvg
Copy link
Member

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?

@clintongormley
Copy link
Contributor

Closed by #9570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>breaking :Search Foundations/Mapping Index mappings, including merging and defining field types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mappings: Deprecate index_name and path
5 participants