incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: [lucy-user] Highlighting/excerpt on URLs
Date Tue, 13 Dec 2011 03:26:10 GMT
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 ("......" - &#8230;&#8230;), 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


Mime
View raw message