diff --git a/solr/example/exampledocs/hd.xml b/solr/example/exampledocs/hd.xml
index 470b2e71697..7555100d8d7 100644
--- a/solr/example/exampledocs/hd.xml
+++ b/solr/example/exampledocs/hd.xml
@@ -28,7 +28,8 @@
6
true
2006-02-13T15:26:37Z
- 45.17614,-93.87341
+
+ 35.0752,-97.032
diff --git a/solr/example/exampledocs/ipod_video.xml b/solr/example/exampledocs/ipod_video.xml
index 8f5dc60f5b2..7895860ea19 100644
--- a/solr/example/exampledocs/ipod_video.xml
+++ b/solr/example/exampledocs/ipod_video.xml
@@ -32,7 +32,7 @@
399.00
10
true
-
- 37.7752,-122.4232
+
+ 37.7752,-100.0232
2005-10-12T08:00:00Z
diff --git a/solr/example/exampledocs/mem.xml b/solr/example/exampledocs/mem.xml
index 52f7a610be1..115d6645a03 100644
--- a/solr/example/exampledocs/mem.xml
+++ b/solr/example/exampledocs/mem.xml
@@ -43,8 +43,8 @@
74.99
7
true
-
- 37.7752,-122.4232
+
+ 37.7752,-100.0232
2006-02-13T15:26:37Z
electronics|4.0 memory|2.0
diff --git a/solr/example/exampledocs/monitor.xml b/solr/example/exampledocs/monitor.xml
index 99bed66f62d..035f61891da 100644
--- a/solr/example/exampledocs/monitor.xml
+++ b/solr/example/exampledocs/monitor.xml
@@ -28,6 +28,6 @@
6
true
- 45.17614,-93.87341
+ 43.17614,-90.57341
diff --git a/solr/example/solr/conf/solrconfig.xml b/solr/example/solr/conf/solrconfig.xml
index f7065814501..f934c6df70b 100755
--- a/solr/example/solr/conf/solrconfig.xml
+++ b/solr/example/solr/conf/solrconfig.xml
@@ -513,13 +513,18 @@
Solritas
- dismax
+ edismax
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
*:*
10
*,score
+
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
+
+ text,features,name,sku,id,manu,cat
+ 3
on
diff --git a/solr/example/solr/conf/velocity/VM_global_library.vm b/solr/example/solr/conf/velocity/VM_global_library.vm
index a42f4c51c76..6d87daff407 100644
--- a/solr/example/solr/conf/velocity/VM_global_library.vm
+++ b/solr/example/solr/conf/velocity/VM_global_library.vm
@@ -4,7 +4,7 @@
#macro(url_for_solr)/solr#if($request.core.name != "")/$request.core.name#end#end
#macro(url_for_home)#url_for_solr/browse#end
-#macro(q)q=$!{esc.url($params.get('q'))}#end
+#macro(q)&q=$!{esc.url($params.get('q'))}#end
#macro(fqs $p)#foreach($fq in $p)#if($velocityCount>1){end}fq=$esc.url($fq)#end#end
@@ -14,15 +14,18 @@
#macro(annotate)#if($request.params.get('annotateBrowse'))&annotateBrowse=true#end#end
-#macro(annTitle $msg)#if($annotate == true)title="$msg"#end#end
+#macro(annTitle $msg)#if($annotate == true)title="$msg"#end#end
-#macro(lens)?#q#if($request.params.getParams('fq') and $list.size($request.params.getParams('fq')) > 0)fqs($request.params.getParams('fq'))#end#debug#if($request.params.get('bf') == 'price')&bf=price#end#annotate#end
+#macro(spatial)#if($request.params.get('sfield'))&sfield=store#end#if($request.params.get('pt'))&pt=$request.params.get('pt')#end#if($request.params.get('d'))&d=$request.params.get('d')#end#end
+
+#macro(lensNoQ)?#if($request.params.getParams('fq') and $list.size($request.params.getParams('fq')) > 0)fqs($request.params.getParams('fq'))#end#debug#boostPrice#annotate#spatial#end
+#macro(lens)#lensNoQ#q#end
#macro(url_for_lens)#{url_for_home}#lens#end
#macro(url_for_start $start)#url_for_home#lens&start=$start#end
-#macro(url_for_filters $p)#url_for_home?#q#if($list.size($p) > 0)fqs($p)#end#debug#end
+#macro(url_for_filters $p)#url_for_home?#q#boostPrice#spatial#if($list.size($p) > 0)fqs($p)#end#debug#end
#macro(url_for_nested_facet_query $field)#url_for_home#lens&fq=$esc.url($field)#end
diff --git a/solr/example/solr/conf/velocity/browse.vm b/solr/example/solr/conf/velocity/browse.vm
index ce7f233b2d9..6830870f618 100644
--- a/solr/example/solr/conf/velocity/browse.vm
+++ b/solr/example/solr/conf/velocity/browse.vm
@@ -1,33 +1,9 @@
#set($searcher=$request.searcher)
#set($params=$request.params)
#set($clusters = $response.response.clusters)
-#set($annotate = $request.params.get("annotateBrowse"))
-
-
+#set($mltResults = $response.response.get("moreLikeThis"))
+#set($annotate = $params.get("annotateBrowse"))
+#parse('query.vm')
#if($response.response.spellcheck.suggestions and $response.response.spellcheck.suggestions.size() > 0)
Did you mean $response.response.spellcheck.suggestions.collation?
#end
diff --git a/solr/example/solr/conf/velocity/footer.vm b/solr/example/solr/conf/velocity/footer.vm
index 77b7bd84a18..79c8f820afc 100644
--- a/solr/example/solr/conf/velocity/footer.vm
+++ b/solr/example/solr/conf/velocity/footer.vm
@@ -1,16 +1,17 @@
-Generated by VelocityResponseWriter
-
-#if($request.params.get('debugQuery'))
+
+
+
+Disclaimer: The locations displayed in this demonstration are purely fictional. It is more than likely that no store with the items listed actually exists at that location!
\ No newline at end of file
diff --git a/solr/example/solr/conf/velocity/hit.vm b/solr/example/solr/conf/velocity/hit.vm
index 5b5d2ac73b1..0f72673e3fd 100644
--- a/solr/example/solr/conf/velocity/hit.vm
+++ b/solr/example/solr/conf/velocity/hit.vm
@@ -1,6 +1,7 @@
+#set($docId = $doc.getFieldValue('id'))
#macro(field $f)
- #if($response.response.highlighting.get($doc.getFieldValue('id')).get($f).get(0))
- $!response.response.highlighting.get($doc.getFieldValue('id')).get($f).get(0)
+ #if($response.response.highlighting.get($docId).get($f).get(0))
+ $!response.response.highlighting.get($docId).get($f).get(0)
#else
#foreach($v in $doc.getFieldValues($f))
$v
@@ -8,11 +9,31 @@
#end
#end
-
#field('name')
-
Price: $!number.currency($doc.getFieldValue('price'))
-
Features: #field('features')
-
In Stock: #field('inStock')
-
+
#field('name')#if($params.getBool('mlt', false) == false)More Like This#end
+ ##do we have a physical store for this product
+ #set($store = $doc.getFieldValue('store'))
+ #if($store)
#end
+
Price: $!number.currency($doc.getFieldValue('price'))
+
Features: #field('features')
+
In Stock: #field('inStock')
+
+ #set($mlt = $mltResults.get($docId))
+ #set($mltOn = $params.getBool('mlt'))
+ #if($mltOn == true)
Similar Items
#end
+ #if ($mltOn && $mlt && $mlt.size() > 0)
+
+ #elseif($mltOn && $mlt.size() == 0)
+
No Similar Items Found
+ #end
+
#if($params.getBool("debugQuery",false))
toggle explain
$response.getExplainMap().get($doc.getFirstValue('id'))
diff --git a/solr/example/solr/conf/velocity/layout.vm b/solr/example/solr/conf/velocity/layout.vm
index fc912d03128..400a2c97c41 100644
--- a/solr/example/solr/conf/velocity/layout.vm
+++ b/solr/example/solr/conf/velocity/layout.vm
@@ -25,6 +25,7 @@
// http://localhost:8983/solr/terms?terms.fl=name&terms.prefix=i&terms.sort=count
});
+
diff --git a/solr/example/solr/conf/velocity/main.css b/solr/example/solr/conf/velocity/main.css
index 351f340e56f..fca2b01c4c0 100644
--- a/solr/example/solr/conf/velocity/main.css
+++ b/solr/example/solr/conf/velocity/main.css
@@ -89,6 +89,8 @@ a {
width: 80%;
}
+
+
.query-box, .constraints {
padding: 5px;
margin: 5px;
@@ -111,7 +113,7 @@ a {
}
.query-boost {
- width: 20%;
+
top: 10px;
left: 50px;
position: relative;
@@ -147,6 +149,24 @@ a {
margin-bottom: 15px;
}
+.result-document div{
+ padding: 5px;
+}
+
+.result-title{
+ width:60%;
+}
+
+.mlt{
+
+}
+
+.map{
+ float: right;
+ position: relative;
+ top: -25px;
+}
+
.result-document:nth-child(2n+1) {
background-color: #eee;
}
diff --git a/solr/example/solr/conf/velocity/query.vm b/solr/example/solr/conf/velocity/query.vm
new file mode 100644
index 00000000000..4dd23569aca
--- /dev/null
+++ b/solr/example/solr/conf/velocity/query.vm
@@ -0,0 +1,66 @@
+