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">).

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 4, 2018 at 11:39 AM
Updated May 27, 2020 at 9:09 AM
Resolved September 26, 2019 at 11:41 AM