Skip to content

fix(#10851): restore Devanagari numeral cross-matching for online user search#11067

Open
shivv23 wants to merge 1 commit into
medic:masterfrom
shivv23:pr-10851-devanagari-search
Open

fix(#10851): restore Devanagari numeral cross-matching for online user search#11067
shivv23 wants to merge 1 commit into
medic:masterfrom
shivv23:pr-10851-devanagari-search

Conversation

@shivv23
Copy link
Copy Markdown

@shivv23 shivv23 commented May 14, 2026

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

  • Expanded freetext queries to search for both Latin and Devanagari digit variants when the search term contains digits.
  • Example: searching 123 now generates (123* OR १२३*), matching contacts in either numeral system.
  • Both fuzzy match and keyed (exact_match) queries are supported.
  • Added 9 new test cases covering digit conversion in both freetext-only and combined (freetext + contact type) queries.

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

  • All ~960 Nouveau unit tests pass, including 9 new test cases for Devanagari numeral expansion.

…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.
@shivv23 shivv23 force-pushed the pr-10851-devanagari-search branch from e55e7ba to fe4d64e Compare May 14, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant