-
Notifications
You must be signed in to change notification settings - Fork 299
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
Use _doc doc type instead of doc #581
Conversation
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.
* @deprecated Will be removed with Elasticsearch V8 | ||
*/ | ||
@Deprecated | ||
private static final String INDEX_TYPE_DOC = "_doc"; |
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.
Code Smell: Do not forget to remove this deprecated code someday. (squid:S1133)
|
||
// With elasticsearch 6.x, we can use _doc as the default type name | ||
if (VERSION.onOrAfter(Version.V_6_0_0)) { | ||
logger.debug("Using elasticsearch >= 6, so we can use {} as the default type name", defaultTypeName); |
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.
Code Smell: Remove this use of "defaultTypeName"; it is deprecated. (squid:CallToDeprecatedMethod)
logger.debug("Using elasticsearch >= 6, so we can use {} as the default type name", defaultTypeName); | ||
} else { | ||
defaultTypeName = INDEX_TYPE_DOC_V5; | ||
logger.debug("Using elasticsearch < 6, so we use {} as the default type name", defaultTypeName); |
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.
Code Smell: Remove this use of "defaultTypeName"; it is deprecated. (squid:CallToDeprecatedMethod)
* @deprecated Will be removed with Elasticsearch V8 | ||
*/ | ||
@Deprecated | ||
private String defaultTypeName = INDEX_TYPE_DOC; |
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.
Code Smell: Do not forget to remove this deprecated code someday. (squid:S1133)
if (VERSION.onOrAfter(Version.V_6_0_0)) { | ||
logger.debug("Using elasticsearch >= 6, so we can use {} as the default type name", defaultTypeName); | ||
} else { | ||
defaultTypeName = INDEX_TYPE_DOC_V5; |
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.
Code Smell: Remove this use of "INDEX_TYPE_DOC_V5"; it is deprecated. (squid:CallToDeprecatedMethod)
if (VERSION.onOrAfter(Version.V_6_0_0)) { | ||
logger.debug("Using elasticsearch >= 6, so we can use {} as the default type name", defaultTypeName); | ||
} else { | ||
defaultTypeName = INDEX_TYPE_DOC_V5; |
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.
Code Smell: Remove this use of "defaultTypeName"; it is deprecated. (squid:CallToDeprecatedMethod)
* @deprecated Will be removed with Elasticsearch V8 | ||
*/ | ||
@Deprecated | ||
private static final String INDEX_TYPE_DOC_V5 = "doc"; |
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.
Code Smell: Do not forget to remove this deprecated code someday. (squid:S1133)
@@ -291,6 +317,10 @@ public Version getVersion() { | |||
return VERSION; | |||
} | |||
|
|||
public String getDefaultTypeName() { | |||
return defaultTypeName; |
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.
Code Smell: Remove this use of "defaultTypeName"; it is deprecated. (squid:CallToDeprecatedMethod)
Closes #552.