I guess you mean from the /browse view?

You can override/replace hit.vm (in conf/velocity/hit.vm) with whatever you 
like.  Here's an example from a demo I recently did using the open Best Buy 
data where I mapped their url value for a product into a url_s field in Solr 
and rendered a link to it:

   <a href="$doc.getFieldValue('url_s')">#field("name_t")</a>

The #field macro is handy, as it'll show the stored value (if specified in fl) 
or return the highlighted stuff if that is in the response.  And $doc is a 
reference to the SolrDocument instance with the following API:   
<http://lucene.apache.org/solr/api/org/apache/solr/common/SolrDocument.html>

        Erik


On Jun 21, 2011, at 12:18 , okayndc wrote:

> hello,
> 
> i'm not sure of the correct velocity syntax to link, let's say a title
> field, to the actual document itself. i have a hostname, a category (which
> is also the directory where the file sits) and filename fields in my schema. 
> can i potentially use these fields to get at the document itself?
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/velocity-hyperlinking-to-documents-tp3091504p3091504.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to