From solr-user-return-121548-apmail-lucene-solr-user-archive=lucene.apache.org@lucene.apache.org Mon Mar 7 00:52:27 2016 Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB6F7180A8 for ; Mon, 7 Mar 2016 00:52:27 +0000 (UTC) Received: (qmail 91875 invoked by uid 500); 7 Mar 2016 00:52:24 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 91809 invoked by uid 500); 7 Mar 2016 00:52:24 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 91797 invoked by uid 99); 7 Mar 2016 00:52:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Mar 2016 00:52:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 37098C1859 for ; Mon, 7 Mar 2016 00:52:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8iWE_MKlU4aE for ; Mon, 7 Mar 2016 00:52:22 +0000 (UTC) Received: from mail-yw0-f169.google.com (mail-yw0-f169.google.com [209.85.161.169]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 56DC75FAE4 for ; Mon, 7 Mar 2016 00:52:22 +0000 (UTC) Received: by mail-yw0-f169.google.com with SMTP id d65so13370102ywb.0 for ; Sun, 06 Mar 2016 16:52:22 -0800 (PST) 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=vZyRjnKcan0bPDpkbNHYsJYTS4SQsvN4rBd3YjY8RZ8=; b=lnvqunGdU6i9TtpN1TLXkbUuKFTZvGB8nEzkCYCfDtQympvu+oz7E2wtRsIN/ifAx7 OF8f3ZSD1NM9xHKRkM70fXUV7y7gp4yCoajGGjNCLt4REq4vl8RQ8Y6RAzfXHKYVq+uZ Cf0YaJzTnbIMU+c4jcEyva2y66TxuDvYmQoARwpxKu+tf28WwNSv2/PXh5d11HrGHCJt zTNMW9XwR+orJ675R2R7IbWued8sjuTmpUB1jInGFh9LFDkGXUeKkopX4BZ9pN82jeNs phTo4U2IHh5qS9CXREmJlyu7UFnqDQNQhElhzTmhU60v1RAH3xwJM1afDjY7YFwWuFjH tgzw== 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=vZyRjnKcan0bPDpkbNHYsJYTS4SQsvN4rBd3YjY8RZ8=; b=TUGIDcFxNLI6oYvTvEVe2qabH3lZg4s8NN/tiyLwzWNHN1wbWV449IzjludbIlqcid jDMd7hAzYcoX7XuvMcH+mCvKacPZtRpgfJDid/672lRtlrCZ6S6ZQKzPleby3HlS4wlq Nn1Dq5NV4+PaQbc8dnDdCa78LwvnW425BePZ53ptR7jM3sYSGysHinTZfy4uzLS95K16 +XWpqob3b3z3Ziy02IWMI5AtlBzBsQq1TO6P76vsYoYhAsjrdsa7bnT5w3A+REoDkNk+ XCDM07QvpPadQW0Il02mqvssl5zUgysAHnppTI3sBq+iZ9ME0s1IbiLv5GmgRJU3s+6I RrOg== X-Gm-Message-State: AD7BkJK6VRz7nTqvlgNx+lZs1iLt7Y/rkhlmgfPJCCwDxGm7N1qIWgtolnC3CIiO4FIqmo26EGG9q0L3K1JBBQ== X-Received: by 10.13.213.130 with SMTP id x124mr384637ywd.208.1457311941818; Sun, 06 Mar 2016 16:52:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.76.4 with HTTP; Sun, 6 Mar 2016 16:51:42 -0800 (PST) In-Reply-To: References: From: Alexandre Rafalovitch Date: Mon, 7 Mar 2016 11:51:42 +1100 Message-ID: Subject: Re: Custom field using PatternCaptureGroupFilterFactory To: solr-user Content-Type: text/plain; charset=UTF-8 I don't see the brackets that mark the group you actually want to capture. As per: http://www.solr-start.com/javadoc/solr-lucene/org/apache/lucene/analysis/pattern/PatternCaptureGroupTokenFilter.html I am also not sure if you actually need "{0,1}" part. Regards, Alex. ---- Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 7 March 2016 at 04:25, Jay Potharaju wrote: > Hi, > I have a custom field for getting the first letter of an firstname. For > this I am using PatternCaptureGroupFilterFactory. > This is not working as expected, not able to parse the data and get the > first character for the string. Any suggestions on how to fix this? > > > > > > > > > > "^[a-zA-Z0-9]{0,1}" preserve_original="false"/> > > > > > > -- > Thanks > Jay