Hello everyone,
I'm encountering a persistent issue on AtoM 2.9.1 (using Elasticsearch 5.x/6.x) where the exact search (after hitting Enter) fails to normalize diacritics, requiring users to type the exact accent to find a result (e.g., searching for "cafe" fails, but "café" works). The autocomplete suggestions, however, work correctly, indicating that the problem is specific to the Search Time query processing, not the Index Time.
I have implemented comprehensive fixes, including:
Complete Analyzer Configuration: The brazilian analyzer has been fully configured in search.yml with lowercase, brazilian_stop, preserved_asciifolding, and brazilian_stem.
Explicit Field Mapping: The field_map: section is correctly set to use analyzer: brazilian and, crucially, search_analyzer: brazilian for full_text, title, and name.
Reindexation: The search index has been rebuilt multiple times (php symfony search:populate).
The failure persists despite the correct Elasticsearch configuration, which strongly suggests that the AtoM application code is overriding the search_analyzer when building the final query_string.
My proposed solution/question is: Should we be explicitly forcing the analyzer on the query construction level?
Suggested Action: Inject the analyzer parameter into the array that builds the Elasticsearch query_string (likely within plugins/arElasticSearchPlugin/lib/model/search/arSearchQueryString.class.php).
Example of parameter injection:
I would appreciate guidance from the community: Is this the recommended fix, or is there a known configuration flag or bug that is causing the search_analyzer defined in search.yml to be ignored in this specific AtoM version?
Thank you for your assistance.
Sincerely,
Rodolfo Peres Rodrigues