79339233

Date: 2025-01-08 13:04:42
Score: 0.5
Natty:
Report link

I spotted an issue that did not solve the problem but is related, the dynamic template was missing the field match_pattern setting the pattern to regex, the correct version follows:

fields: {
    mapping: {
        type: 'text'
    },
    match_mapping_type: 'string',
    match_pattern: 'regex',
    path_match: 'dict.*',
    match: '^\\d{1,19}$'
}

in addition to this dynamic template correction I needed to introduce the following to my mapping.properties:

dict: { type: 'object' },

in my tests this accepts the digit fields and reject non-digit ones, solving the problem, but also accept empty dict, which is not ideal.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Arthur Caccavo