Skip to content

compatibility synonym with other filter ? #27481

@nacimgoura

Description

@nacimgoura

Hello,
I have updated my elastic from 5.6.4 to 6.0.0 but I have a problem that I can't solve even with documentation.

  • Elasticsearch version : 6.0.0
  • Plugins installed: [analysis-icu, ingest-attachment, analysis-phonetic]
  • OS version : Docker elastic in ubuntu 16.04.3

I can't update my settings, I have the failed to build synonyms error.

Here's my filter :

filter: {
    french_synonym: {
                        type: 'synonym',
                        synonyms: [
                            'min, minute, minimum',
                            'boulevard, rue, avenue',
                            'ville, village',
                            'cosmos, galaxie,univers',
                            'docteur, medecin, doctor',
                            'foot2rue, foot de rue,foot 2 rue',
                            'animaux, betes',
                            'chine, asie, asiatique, chinois, cantonais, jaune',
                            'accusé, coupable',
                            'sdf, sans domilcile fixe',
                            'Histoire, légende',
                            'tgv, train, ter, sncf, train grande vitesse',
                            'canada,canadienne',
                            'terrien,terre',
                        ],
                    },
},

Here's my analyzer :

analyzer: {
               french_heavy: {
                    type: 'custom',
                    tokenizer: 'icu_tokenizer',
                    filter: [
                        'icu_folding',
                        'french_synonym',
                    ],
                },

Here's my error :

'{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"failed to build synonyms"}],"type":"illegal_argument_exception","reason":"failed to build synonyms","caused_by":{"type":"parse_exception","reason":"Invalid synonym rule at line 1","caused_by":{"type":"illegal_argument_exception","reason":"term: psychiatrie analyzed to a token with posinc != 1"}}},"status":400}'

I have the impression that the synonym filter is not compatible with other filters. For example in my case with icu_folding.
I really feel like it's a bug.
Has anyone had the same problem ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions