nfsantos commented on code in PR #649:
URL: https://github.com/apache/jackrabbit-oak/pull/649#discussion_r951152234
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticIndexHelper.java:
##########
@@ -207,21 +222,57 @@ private static void mapIndexRules(ElasticIndexDefinition
indexDefinition, XConte
useInSuggest = true;
}
}
-
+ /* TODO: (Add JIRA issue # once available) Potential future
optimization:
+ * If a property has propertyIndex=false, we could in principle
create an ES mapping with index=false to
+ * avoid creating an index for this property, thus saving time
and space. However, there is an issue
+ * with function indexes, which incorrectly rely on the index
being created even in the case where
+ * propertyIndex=false. Once this issue is solved, revise the
logic below to set index=false in the ES
+ * field if propertyIndex=false.
+ */
mappingBuilder.startObject(name);
{
//
https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html
if (Type.BINARY.equals(type)) {
mappingBuilder.field("type", "binary");
+ // ignore_malformed not allowed for binary fields but also
not needed as there is no type conversion
+ if (indexDefinition.isAnalyzed(propertyDefinitions)) {
+ createNestedAnalyzed(mappingBuilder);
Review Comment:
I will try to simplify the logic on this method once we have a final version
of the mappings. This logic is needed for all cases except for booleans, so it
is not so straightforward to move it to a common place.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]