lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Linwood <j...@greenninja.com>
Subject Re: Velocity template
Date Thu, 01 May 2003 12:53:44 GMT
Hi,

The demo is set up as a JSP application.  If you want to use Velocity 
with Lucene, it's actually very easy.

 From inside your application, when the user calls your Search action, 
use the search() method on IndexSearcher to get a Hits object.  The 
easiest (not necessarily the best performance, though) thing to do is to 
put that Hits object into a Velocity Context, and then loop through that 
Hits object in your Velocity template to get Documents. Read the Fields 
  off of your Document objects, and display them to the reader however 
it works for your app.

Hope this helps some,
Jeff Linwood

Claude Favre wrote:
> I was looking at the archive and could not find any help on using lucene
> with velocity vm template as opposed to jsp.
> 
>  
> 
> I run the examples and the page that are return are jsp pages. I was
> wondering if someone knew of a tutorial or sample on how to return the
> search as a vm template.
> 
>  
> 
> Thank you
> 
>  
> 
> Claude
> 
>  
> 
> Claude Favre  
>  
> 
>  
> 
>  
> 
> 



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


Mime
View raw message