lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: how to get the snippet?
Date Mon, 01 Aug 2005 17:21:24 GMT
Hi,

If you want highlighting like this:
  http://simpy.com/simpy/User.do?username=otis&q=lucene
or like this:
  http://lucenebook.com/search?query=highlighter

Then you'll want to pull Lucene directly from SVN, and look in the
contrib/ directory, where you'll find classes for highlighter.  You can
then build a Jar for the highlighter and use it in your app.  The API
is simple (you can download the code from the Lucene book and see how
it's done).

Otis


--- Riccardo Daviddi <rdaviddi@gmail.com> wrote:

> Hy all,
> 
> which is the way to get a snippet of a query?
> Does Lucene offer some explicit methods?
> If is not so, it's possible to know the position of the matched
> keyword in the query into the field of the doc, so that I can take
> some words before and after the keyword to create the snippet?
> Or there is a smarter way to get the snippet?
> 
> thx in advance!
> -- 
> Riccardo Daviddi
> University of Siena - Information Engeneering
> rdaviddi@gmail.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message