You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "fabriziofortino (via GitHub)" <gi...@apache.org> on 2023/07/25 12:19:01 UTC
[GitHub] [jackrabbit-oak] fabriziofortino commented on a diff in pull request #1035: OAK-10365: introduce mapping version in elastic index definition
fabriziofortino commented on code in PR #1035:
URL: https://github.com/apache/jackrabbit-oak/pull/1035#discussion_r1273445678
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticIndexDefinition.java:
##########
@@ -269,6 +274,14 @@ public boolean analyzerConfigSplitOnNumerics() {
return getOptionalValue(analyzersTree, SPLIT_ON_NUMERICS, false);
}
+ /**
+ * Returns the mapping version for this index definition.
+ * If the version is not specified, the default value is {@code 1.0.0}.
+ */
+ public String getMappingVersion() {
+ return getOptionalValue(definition, PROP_INDEX_MAPPING_VERSION, "1.0.0");
+ }
Review Comment:
The mapping version is internal and cannot be changed in the index definition (it's stored in a hidden property). If the index definition does not have a version, we return the base version currently set as `1.0.0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org