-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[[breaking-minor-changes]] | ||
= Breaking changes between 1.x releases | ||
|
||
[partintro] | ||
-- | ||
This section discusses the changes that you need to be aware of when migrating | ||
your application from Elasticsearch 1.x to Elasticsearch 1.y. | ||
-- | ||
|
||
== Facets | ||
|
||
Facets are deprecated and will be removed in a future release. You are | ||
encouraged to migrate to <<search-aggregations, aggregations>> instead. | ||
|
||
== 1.4.0 | ||
|
||
=== Index names | ||
|
||
As of Elasticsearch 1.4.0, custom `index_name` are not supported anymore. | ||
Indices that have been created prior to Elasticsearch 1.4.0 will still be | ||
allowed to add or modify mappings with custom index names, but indices | ||
that are created on an Elasticsearch version that is greater than or equal | ||
to 1.4.0 will not. | ||
|
||
When custom `index_name` were used to store the content of several fields | ||
into a single index field, it is recommended to use the | ||
<<copy-to,`copy_to`>> feature instead. | ||
|
||
See https://github.com/elasticsearch/elasticsearch/issues/6677[#6677] for more | ||
information. | ||
|
||
=== path: just_name | ||
|
||
`path: just_name` is deprecated since Elasticsearch 1.0 and will not be | ||
supported on indices created on or after Elasticsearch 1.4.0. | ||
|
||
It is recommended to use the <<copy-to,`copy_to`>> feature instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ | |
|
||
package org.elasticsearch.index.mapper.object; | ||
|
||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor; | ||
import com.google.common.collect.Iterables; | ||
import org.apache.lucene.document.Field; | ||
import org.apache.lucene.index.IndexableField; | ||
|
@@ -29,13 +28,12 @@ | |
import org.apache.lucene.util.BytesRef; | ||
import org.elasticsearch.ElasticsearchIllegalStateException; | ||
import org.elasticsearch.ElasticsearchParseException; | ||
import org.elasticsearch.Version; | ||
import org.elasticsearch.common.Nullable; | ||
import org.elasticsearch.common.Strings; | ||
import org.elasticsearch.common.collect.ImmutableOpenMap; | ||
import org.elasticsearch.common.collect.UpdateInPlaceMap; | ||
import org.elasticsearch.common.joda.FormatDateTimeFormatter; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.common.util.CollectionUtils; | ||
import org.elasticsearch.common.xcontent.ToXContent; | ||
import org.elasticsearch.common.xcontent.XContentBuilder; | ||
import org.elasticsearch.common.xcontent.XContentParser; | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. I think that we should do In case in the future we want to add a new option... |
||
throw new MapperParsingException("`path: just_name` is not supported on indices created on or after Elasticsearch 1.4.0"); | ||
} | ||
|
||
ContentPath.Type origPathType = context.path().pathType(); | ||
context.path().pathType(pathType); | ||
context.path().add(name); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
+1 I like this separate 1.x migrate page!