Elasticsearch or Lucene synonyms (wordnet) Bug

when i was using synonym filter in elasticsearch 5.0 it was run perfect but i just upgrade to elasticsearch 6.0.1 and it gives me error i use php elasticsearch client and wordnet synonyms.

Fatal error: Uncaught Elasticsearch\Common\Exceptions\BadRequest400Exception: {"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 109","caused_by":{"type":"illegal_argument_exception","reason":"term: course of action analyzed to a token with posinc != 1"}}},"status":400}

i think that error from lucene.

i also use stopFilter and when i use synonymn filter befor the stopFilter then it will solve my issue.

Could you share your mappings and settings?

Yes here it is the mapping of synonyms

icu_synonym' => [
'type'		=> 'custom',
'char_filter'	=> ['html_strip', 'quotes'],
'tokenizer'	=> 'icu_tokenizer',
'filter'	=> ['lowercase', 'icu_normalizer', 'synonym', 'en_stop_filter', 'en_stem_filter', 'icu_folding'],
],

Can you also share each tokenizer/token filter/ char filter settings?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.