completly ignore ascents in index and search

hi,

I’m trying to make my index return all the results ignoring the accents in my search, so both “perú” and “peru” gets the exact same results

at the moment the best i have manage to do is to make “perú“ return the same result as “peru“ but not the other way around, this setting the chart table ú→u, but this is not really what i want as having the inverse is as important

this is the config of my distributed index

index searchnews{

charset_type  = utf-8

charset_table = non_cjk,&,+,U+00E1->a, U+00E9->e, U+00ED->i, U+00F3->o, U+00FA->u,U+00C1->a, U+00C9->e, U+00CD->i, U+00D3->o, U+00DA->u,U+00F1->n, U+00D1->n,U+00FC->u, U+00DC->u

type = distributed

local = main_search

}

and this is the other one
index main_search{

source = main_search

path = /var/lib/manticore/main_search

charset_table = non_cjk,&,+,U+00E1->a, U+00E9->e, U+00ED->i, U+00F3->o, U+00FA->u,U+00C1->a, U+00C9->e, U+00CD->i, U+00D3->o, U+00DA->u,U+00F1->n, U+00D1->n,U+00FC->u, U+00DC->u

}

i have more index but is a main + delta so they almost the same

thanks for the help

It should work by default if you don’t specify charset_table
Here’s an example:


mysql> drop table if exists t; create table t(f text); insert into t values(1, 'perú'),(2, 'peru'); select * from t where match('peru'); select * from t where match('perú');
--------------
drop table if exists t
--------------

Query OK, 0 rows affected (0.003 sec)

--------------
create table t(f text)
--------------

Query OK, 0 rows affected (0.003 sec)

--------------
insert into t values(1, 'perú'),(2, 'peru')
--------------

Query OK, 2 rows affected (0.001 sec)

--------------
select * from t where match('peru')
--------------

+------+-------+
| id   | f     |
+------+-------+
|    1 | perú  |
|    2 | peru  |
+------+-------+
2 rows in set (0.001 sec)
--- 2 out of 2 results in 0ms ---

--------------
select * from t where match('perú')
--------------

+------+-------+
| id   | f     |
+------+-------+
|    1 | perú  |
|    2 | peru  |
+------+-------+
2 rows in set (0.000 sec)
--- 2 out of 2 results in 0ms ---