nfsantos commented on code in PR #2125:
URL: https://github.com/apache/jackrabbit-oak/pull/2125#discussion_r1977518341
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticCustomAnalyzerMappings.java:
##########
@@ -187,9 +187,14 @@ protected interface ParameterTransformer {
reKey.apply(luceneParams, Map.of("mapping", "mappings"))
);
- LUCENE_ELASTIC_TRANSFORMERS.put(SynonymFilterFactory.class,
luceneParams ->
- reKey.apply(luceneParams, Map.of("tokenizerFactory",
"tokenizer"))
- );
+ LUCENE_ELASTIC_TRANSFORMERS.put(SynonymFilterFactory.class,
luceneParams -> {
+ // lucene does not support this option (see
UNSUPPORTED_LUCENE_PARAMETERS) and it's lenient by default
+ // elastic is not lenient by default, so we need to set it to true
in case it's not present
+ if (!luceneParams.containsKey("lenient")) {
Review Comment:
Does Elastic treat the keys as case sensitive or insensitive? That is, could
the map contain "LENIENT" or "Lenient" and still be interpreted the same as
"lenient"? In that case, the `luceneParams` map could contain several entries
for lenient and it may not be clear which one will be used by Elastic.
--
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]