[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Search highlighting using xslt 2.0

Subject: Re: Search highlighting using xslt 2.0
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Wed, 24 Mar 2004 08:23:46 -0800
queryhighlightextractor
Andrew Welch wrote:

This means there are effectively two copies of the same information.  We
currently use special delimiters to tell our search highlighting code
not to include the first table's header in the highlighting regex, but I
would like to use the markup instead.  Can Lucene handle this (I will
check)?

I index configuration, metadata xml and content pieces with lucene. When doing the search I get the hits and take field values and form that into XML to be styled by XSL (resulting in something similar to what you have, I think). You can even index your XSL offline for your own use :). Anyway, using this:



QueryHighlightExtractor qhe = new QueryHighlightExtractor(query, new StandardAnalyzer(), "<span class='highlight'>", "</span>");

will do what you want.

A while ago I did searches with XSL and found it to be extremely resource intensive, in our case. Indexing with Lucene is extremely fast and searching that index is extremely fast and light on resources. There are many types of searches that are ridiculously hard with XSL (i.e. fuzzy queries). Check out the contributions and sandbox on the lucene site - you can probably have something up and running within a day.

best,
-Rob

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.