Allow the definition of one "search" analyzer per field as part of the mapping

Description

We currently allow overriding analyzers at query time, by calling org.hibernate.search.query.dsl.EntityContext#overridesForField.

In some (most?) cases though, users will want to always override the analyzer when a field is queried, and will want to always use the same analyzer as an override.

We should provide a way to define a "search analyzer" when adding a field to the mapping. By default, the query analyzer will be the same as the "main" analyzer used when querying. But whenever the "query" analyzer is defined, it will systematically be used when querying (unless there is a query-time override).

Note: we should chose the name carefully. Elasticsearch calls this concept "search analyzer", while Solr seems to consider it a "query analyzer" (<analyzer type="query">).

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure