You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found the LIKE filter can be improved with french langage because it have accent. (like in the demo dataset).
The original implementation unaccent the uppercase result.
The following query on the base_unit table
SELECT (unaccent(UPPER(name))) FROM public.base_unit;
returns
unaccenttext
--
UNITe
PIeCE
BOiTE DE 2 PCES
We can see that UPPER does not affect accented characters. (Unité -> UNITé)
The following query returns a much better result
SELECT (LOWER(unaccent(name))) FROM public.base_unit;
lowertext
--
unite
piece
boite de 2 pces
I don't know if it has side effects on the entire application.
I'm testing that modification in com.axelor.rpc.filter, first tests are concluant on base unit conversion form.
@Override
public String getQuery() {
if (DBHelper.isUnaccentEnabled()) {
return String.format(
"LOWER((unaccent(%s))) %s LOWER(unaccent(?)))", getOperand(), getOperator());
}
....
}
NB: PostgreSQL 11.1 on x86_64-apple-darwin13.4.0, compiled by Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn), 64-bit
The text was updated successfully, but these errors were encountered:
I've found the LIKE filter can be improved with french langage because it have accent. (like in the demo dataset).
The original implementation unaccent the uppercase result.
The following query on the base_unit table
SELECT (unaccent(UPPER(name))) FROM public.base_unit;
returns
We can see that UPPER does not affect accented characters. (Unité -> UNITé)
The following query returns a much better result
SELECT (LOWER(unaccent(name))) FROM public.base_unit;
I don't know if it has side effects on the entire application.
I'm testing that modification in com.axelor.rpc.filter, first tests are concluant on base unit conversion form.
NB: PostgreSQL 11.1 on x86_64-apple-darwin13.4.0, compiled by Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn), 64-bit
The text was updated successfully, but these errors were encountered: