Move to solr 4 plus corrections to SparqlQueryExecutorTest with newlines and white space characters
This commit is contained in:
parent
b642f30391
commit
120be1e6b8
122 changed files with 17422 additions and 5288 deletions
32
solr/homeDirectoryTemplate/conf/velocity/product_doc.vm
Normal file
32
solr/homeDirectoryTemplate/conf/velocity/product_doc.vm
Normal file
|
@ -0,0 +1,32 @@
|
|||
#**
|
||||
* Render a hit representing a Product
|
||||
* assumed to have a field called "name"
|
||||
*#
|
||||
|
||||
<div class="result-title"><b>#field('name')</b><span class="mlt"> #if($params.getBool('mlt', false) == false)<a href="#lensNoQ&q=id:$docId&mlt=true">More Like This</a>#end</span></div>
|
||||
##do we have a physical store for this product
|
||||
#set($store = $doc.getFieldValue('store'))
|
||||
#if($store)<div class="map"><img src="http://maps.google.com/maps/api/staticmap?&zoom=12&size=150x80&maptype=roadmap&markers=$doc.getFieldValue('store')&sensor=false" /><div><small><a target="_map" href="http://maps.google.com/?q=$store&source=embed">Larger Map</a></small></div></div>#end
|
||||
<div>Id: #field('id')</div>
|
||||
<div>Price: #field('price_c')</div>
|
||||
<div>Features: #field('features')</div>
|
||||
<div>In Stock: #field('inStock')</div>
|
||||
<div class="mlt">
|
||||
#set($mlt = $mltResults.get($docId))
|
||||
#set($mltOn = $params.getBool('mlt'))
|
||||
#if($mltOn == true)<div class="field-name">Similar Items</div>#end
|
||||
#if ($mltOn && $mlt && $mlt.size() > 0)
|
||||
<ul>
|
||||
#foreach($mltHit in $mlt)
|
||||
#set($mltId = $mltHit.getFieldValue('id'))
|
||||
<li><div><a href="#url_for_home?q=id:$mltId">$mltId</a></div><div><span class="field-name">Name:</span> $mltHit.getFieldValue('name')</div>
|
||||
<div><span class="field-name">Price:</span> $!number.currency($mltHit.getFieldValue('price')) <span class="field-name">In Stock:</span> $mltHit.getFieldValue('inStock')</div>
|
||||
|
||||
</li>
|
||||
#end
|
||||
</ul>
|
||||
#elseif($mltOn && $mlt.size() == 0)
|
||||
<div>No Similar Items Found</div>
|
||||
#end
|
||||
</div>
|
||||
#parse('debug.vm')
|
Loading…
Add table
Add a link
Reference in a new issue