fix(#10851): restore Devanagari numeral cross-matching for online user search#11067
Open
shivv23 wants to merge 1 commit into
Open
fix(#10851): restore Devanagari numeral cross-matching for online user search#11067shivv23 wants to merge 1 commit into
shivv23 wants to merge 1 commit into
Conversation
…e user search The Nouveau search index migration in 5.x broke numeral cross-matching for online users. Searching with Latin digits (e.g., '12345') no longer returned contacts with Devanagari numerals in their names, and vice versa. Expanded freetext queries to search for both Latin and Devanagari digit variants when the search term contains digits. For example, searching '123' now generates '(123* OR १२३*)', matching contacts in either numeral system. Both fuzzy match and keyed (exact_match) queries are supported.
e55e7ba to
fe4d64e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Nouveau search index migration in 5.x broke numeral cross-matching for online users. Searching with Latin digits (e.g.,
12345) no longer returned contacts with Devanagari numerals in their names, and vice versa.Changes
123now generates(123* OR १२३*), matching contacts in either numeral system.exact_match) queries are supported.Technical details
latinToDevanagari()converts Latin digits (0-9) to Devanagari equivalents (०-९).devanagariToLatin()converts Devanagari digits to Latin equivalents.hasDigits()detects whether a string contains digits in either numeral system.getQueryByFreetext()generates an OR query when both variants differ.Testing