Return-Path: X-Original-To: apmail-incubator-lucy-user-archive@www.apache.org Delivered-To: apmail-incubator-lucy-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7372C7857 for ; Tue, 13 Dec 2011 03:33:15 +0000 (UTC) Received: (qmail 44077 invoked by uid 500); 13 Dec 2011 03:33:14 -0000 Delivered-To: apmail-incubator-lucy-user-archive@incubator.apache.org Received: (qmail 44000 invoked by uid 500); 13 Dec 2011 03:33:13 -0000 Mailing-List: contact lucy-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucy-user@incubator.apache.org Delivered-To: mailing list lucy-user@incubator.apache.org Received: (qmail 43991 invoked by uid 99); 13 Dec 2011 03:33:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 03:33:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.116.39.62] (HELO rectangular.com) (68.116.39.62) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 03:33:02 +0000 Received: from marvin by rectangular.com with local (Exim 4.69) (envelope-from ) id 1RaJ0M-0008LC-Q2 for lucy-user@incubator.apache.org; Mon, 12 Dec 2011 19:26:10 -0800 Date: Mon, 12 Dec 2011 19:26:10 -0800 From: Marvin Humphrey To: lucy-user@incubator.apache.org Message-ID: <20111213032610.GA32019@rectangular.com> References: <24613f56021463b8666d7406a1143b06.squirrel@zenmail.co.za> <20111211210102.GA15477@rectangular.com> <997b1bc81bd59ee219a957f192e9080d.squirrel@zenmail.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <997b1bc81bd59ee219a957f192e9080d.squirrel@zenmail.co.za> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [lucy-user] Highlighting/excerpt on URLs On Mon, Dec 12, 2011 at 01:17:45PM +0200, Henry C. wrote: > On Sun, December 11, 2011 23:01, Marvin Humphrey wrote: > > I'm not sure I understand exactly. Are you saying that if you've set > > excerpt_length to N, URLs which are over N characters will return an ellipsis > > rather than truncate? > > > > # excerpt_length => 20 > > http://www.foo.com/ => http://www.foo.com/ # correct > > http://www.foo.com/stuff.html => http://www.foo.com/… # desired > > http://www.foo.com/stuff.html => … # actual > > Correct. Okeedoke. BTW, whatever version of SquirrelMail you're using apparently doesn't handle UTF-8 properly. :) > If I comment out "excerpt_length => 60," above, then it returns the full > non-truncated excerpt with highlighting as expected. That's just because the default excerpt length is 200. If you had a longer URL, you'd experience the same problem. > The following return double-ellipses ("......" - ……), searching > for [adsl mweb.com]: > > [http://www.mweb.co.za/helpcentre/ADSL/ADSLGeneralIdisagreewithyourusagereport.aspx] > [http://www.mweb.co.za/helpcentre/FrequentlyAskedQuestions/MWEBHelpCentreFAQsHowdoI/FAQHowdoIHowdoImigratemyADSL/tabid/661/Default.aspx] Ick. OK, this is definitely a bug. Please file. IMO the desired behavior is to truncate at one less than $excerpt_length and append an ellipsis. For now, I'd suggest a workaround of keeping around a second $highlighter with a longer excerpt length and performing the truncation yourself. Marvin Humphrey