We're updating the issue view to help you get more done. 

Allow analyzer/normalizer overrides on a per-predicate basis

Description

WARNING: We should be particularly careful about checking that combining match queries using an overridden analyzer with queries that use the scoped analyzer (phrase queries, simple query string queries) doesn’t trigger two analyses. => This is not relevant anymore in Search 6, we just don't use the scoped analyzer when querying.

Currently when you override an analyzer when searching, you have to do it consistently for all the searched fields, for instance in the Simple Query String query. Why not simply allow to override the analyzer for one predicate in particular, regardless of how many fields it targets?

This would provide the added benefit to allow to refine what we expect from the user depending on the type of predicate. For instance, in wildcard and fuzzy queries, we would expect a normalizer instead of an analyzer, so we would expose a ‌.normalizer(String) method instead of a ‌.analyzer(String) method.

Note we should also provide a way to disable the analyzer/normalizer (similar to “ignoreAnalyzer” in Search 5).

Environment

None

Status

Assignee

Fabio Massimo Ercoli

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

Yes, likely

Feedback Requested

None

Fix versions

Priority

Major