Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 14D22200B51 for ; Mon, 1 Aug 2016 18:51:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1380A160A6C; Mon, 1 Aug 2016 16:51:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5A63F160A66 for ; Mon, 1 Aug 2016 18:51:14 +0200 (CEST) Received: (qmail 85553 invoked by uid 500); 1 Aug 2016 16:51:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 85536 invoked by uid 99); 1 Aug 2016 16:51:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2016 16:51:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id A8DDDC03CB for ; Mon, 1 Aug 2016 16:51:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id MU7vvjXN4ySn for ; Mon, 1 Aug 2016 16:51:10 +0000 (UTC) Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 159D55F1BE for ; Mon, 1 Aug 2016 16:51:10 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id j185so200126914oih.0 for ; Mon, 01 Aug 2016 09:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=H0jM8km4yf/A8+xygXUA5yWq45ljHUKETA1D2qhw7y8=; b=ZigXO0xuCeFO6AGNcUEZMI+uzcmFdDDkZeAm2KeI5yOkSbGKNQ/FlLCrOzTtWjf0HS KWFUKCrYMWPF0ZcEjKgKirwhge6ZaEIdtCL6YUS5PCbGt3C9EZVSUrFEdNokzGG6yZ7y AkWZogYhrGBBiOROqr2FhCIN1w1meZX08IfvqYal9yo9hyoDYAkLTIHH5lMnKksHrBjK Vn6FwnBqLLUFiqFz1M5qoACdAr7f3MBggw+SwGIHw8IZ1/JB56rEBgEyWCtfiYHbun2Q 9iAXByaaNhR+H5Tc3ek1AAABYNxJw8JMyx3C1og5AkMr1FHNjQ+ISxFXxUULZn25QoKX +i/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=H0jM8km4yf/A8+xygXUA5yWq45ljHUKETA1D2qhw7y8=; b=Jb0tkl2zbark0QK2prXnq08PZ1D4zh8f/k8uVVMTDm3Bs2ukTv3CCYp3+Oym/k/qrU hdw/SuqY7tJ7p11fNUYoLVVLad5jbO62b49n2uXxFxxM/wIE4WLiX9wNx8LggRpsMQ0K dgVdpjjmvUvwNSrEiByVI/XP1XtqsFxCPuMb+6kLTwEnvI60csm28/SOkl4oLmvkaPIU TtRRdDuw95+5OXmofwsoR30twIyoOs1ydxK7uDozyzjY90hceJbw9HqVv6qAJcsTlzSa 6PUe67MzFuUwrFuE7esA6E7Oa6lvDOE5LfwWBf6gNBljYIe56WlPiD4p1BLBRxFvgdEI DSYQ== X-Gm-Message-State: AEkoouuzDVHsmIL5FZZ2HWTUFx/b9OTRWq3sf8/n00IJNZaP8SpD9xwCv43pZaafDw3+eQjIB0qXj1DpmP4MXA== X-Received: by 10.202.114.81 with SMTP id p78mr33765274oic.16.1470070257933; Mon, 01 Aug 2016 09:50:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.61.197 with HTTP; Mon, 1 Aug 2016 09:50:57 -0700 (PDT) In-Reply-To: References: From: Tony Sun Date: Mon, 1 Aug 2016 09:50:57 -0700 Message-ID: Subject: Re: Mango full text search is immune to accented letters? To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=001a11352e7884e1d305390567c6 archived-at: Mon, 01 Aug 2016 16:51:15 -0000 --001a11352e7884e1d305390567c6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hey Teo, Were you able to get Mango text search working? Specifying the analyzer get's a little tricky. On Sat, Jul 30, 2016 at 5:17 AM, Constantin Teodorescu wrote: > 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=C5=9Ft=C4= =83" in > documents! > SQLite3 FTS4 is able to do that! > > For the moment I'm using CouchDB 1.6 views with explicit "flatten functio= n" > in JavaScript to create a non-accented index: > > var translate_re =3D /[=C5=9E=C8=98=C5=A2=C8=9A=C3=8E=C4=82=C3=82=C3=81= =C5=9F=C8=99=C5=A3=C8=9B=C3=AE=C4=83=C3=A2=C3=A1]/g, > translate =3D { > '=C5=9E': 'S', '=C5=9F': 's', > '=C8=98': 'S', '=C8=99': 's', > '=C5=A2': 'T', '=C5=A3': 't', > '=C8=9A': 'T', '=C8=9B': 't', > '=C4=82': 'A', '=C4=83': 'a', > '=C3=82': 'A', '=C3=A2': 'a', > '=C3=81': 'A', '=C3=A1': 'a', > '=C3=8E': 'I', '=C3=AE': 'i' > }; > > function makeSearchString(s) { > return ( s.replace(translate_re, function(match) { > return translate[match]; > }) ); > } > > Teo > --001a11352e7884e1d305390567c6--