Is Mango Full text indexer/search (or would it be) immune for accented
letters?

I'm planning to use it for searching "posta" but it may be "poştă" in
documents!
SQLite3 FTS4 is able to do that!

For the moment I'm using CouchDB 1.6 views with explicit "flatten function"
in JavaScript to create a non-accented index:

  var translate_re = /[ŞȘŢȚÎĂÂÁşșţțîăâá]/g,
      translate = {
        'Ş': 'S', 'ş': 's',
        'Ș': 'S', 'ș': 's',
        'Ţ': 'T', 'ţ': 't',
        'Ț': 'T', 'ț': 't',
        'Ă': 'A', 'ă': 'a',
        'Â': 'A', 'â': 'a',
        'Á': 'A', 'á': 'a',
        'Î': 'I', 'î': 'i'
      };

    function makeSearchString(s) {
        return ( s.replace(translate_re, function(match) {
          return translate[match];
        }) );
    }

Teo

Reply via email to