You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Fred Zimmerman <wf...@nimblebooks.com> on 2011/09/26 14:17:06 UTC

Velocity to fetch full docs?

Hi,

I am using Nutch/Solr to index an intranet of about 12 million pages and
when I do a search I want Solr to retrieve the full documents and append
them into a single simple HTML doc (no js, not ads, etc.), then shoot the
single doc to another (nonSolr) process for postprocessing.   Can I use
Velocity to do this? How?  Can Velocity "reach back" to the Nutch crawl for
the full text of the docs (they don't change often at all)?

Any help would be much appreciated.

Re: Velocity to fetch full docs?

Posted by Sergiu Dumitriu <se...@xwiki.com>.
On 09/26/2011 10:56 AM, Nathan Bubna wrote:
> Definitely for a question for the Nutch or Solr lists.  Velocity is a
> simple template engine and knows nothing about Nutch or Solr that it
> isn't "told" about.

Indeed, Velocity is a very simple template engine, with no smart APIs 
provided by the engine alone. What you need to do is to put in the 
context some data objects holding the instance data you're currently 
processing (or even just the servlet request and response objects to get 
access to the request parameters), and some smart objects that can 
contact Solr, Nutch and your other nonSolr services. You'd have to write 
these yourself in Java, and put instances in the velocity context before 
parsing.

Another approach is to put enough low level services to allow you to 
implement the whole logic inside a Velocity template, like a HTTP 
client, XML processing library, the escape tool, etc.

> On Mon, Sep 26, 2011 at 5:17 AM, Fred Zimmerman<wf...@nimblebooks.com>  wrote:
>> Hi,
>>
>> I am using Nutch/Solr to index an intranet of about 12 million pages and
>> when I do a search I want Solr to retrieve the full documents and append
>> them into a single simple HTML doc (no js, not ads, etc.), then shoot the
>> single doc to another (nonSolr) process for postprocessing.   Can I use
>> Velocity to do this? How?  Can Velocity "reach back" to the Nutch crawl for
>> the full text of the docs (they don't change often at all)?
>>
>> Any help would be much appreciated.
>>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

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


Re: Velocity to fetch full docs?

Posted by Nathan Bubna <nb...@gmail.com>.
Definitely for a question for the Nutch or Solr lists.  Velocity is a
simple template engine and knows nothing about Nutch or Solr that it
isn't "told" about.

On Mon, Sep 26, 2011 at 5:17 AM, Fred Zimmerman <wf...@nimblebooks.com> wrote:
> Hi,
>
> I am using Nutch/Solr to index an intranet of about 12 million pages and
> when I do a search I want Solr to retrieve the full documents and append
> them into a single simple HTML doc (no js, not ads, etc.), then shoot the
> single doc to another (nonSolr) process for postprocessing.   Can I use
> Velocity to do this? How?  Can Velocity "reach back" to the Nutch crawl for
> the full text of the docs (they don't change often at all)?
>
> Any help would be much appreciated.
>

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