couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Constantin Teodorescu <>
Subject Mango full text search is immune to accented letters?
Date Sat, 30 Jul 2016 12:17:41 GMT
Is Mango Full text indexer/search (or would it be) immune for accented

I'm planning to use it for searching "posta" but it may be "poştă" in
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];
        }) );


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message