Allow analyzer/normalizer overrides on a per-predicate basis
Description
follows up on
is a fix for
Activity
Show:
Fixed
Assignee
![](https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/FE-0.png)
Reporter
![](https://secure.gravatar.com/avatar/2a8bdd4ffd282b7185c74b52ab452617?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FYR-6.png)
Components
Sprint
None
Fix versions
Priority
Created August 31, 2018 at 2:20 PM
Updated April 4, 2019 at 9:41 AM
Resolved April 3, 2019 at 9:25 AM
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).