Make Elasticsearch translation extensible for usage of elasticsearch plugins

Description

Hello,

I am using Hibernate Search v. 5.11.5.Final.

When using Lucene as backend I include for phonetic analyzing following dependency. That works great.

org.apache.lucene:lucene-analyzers-phonetic:5.5.5

When using Elasticsearch as backend I have to install the analysis-phonetic plugin of elasticsearch. I annotate my fields with PhoneticFilterFactory.class. But on startup I get following exception message:

HSEARCH400060: The token filter factory 'org.apache.lucene.analysis.phonetic.PhoneticFilterFactory' is not supported with Elasticsearch.

In my (following) pull request I refactored the DefaultElasticsearchAnalyzerDefinitionTranslator so, that the lucene analyzers, charFilters, tokenizers and tokenFilters are extensible.

Environment

None

Assignee

Yoann Rodière

Reporter

Rokko_11 NA

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Affects versions

Priority

Major
Configure