You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gs...@apache.org on 2011/03/02 16:39:42 UTC
svn commit: r1076260 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/
solr/example/solr/conf/velocity/
Author: gsingers
Date: Wed Mar 2 15:39:41 2011
New Revision: 1076260
URL: http://svn.apache.org/viewvc?rev=1076260&view=rev
Log:
SOLR-2178: 3.x backport
Added:
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_fields.vm
- copied unchanged from r1026058, lucene/dev/trunk/solr/example/solr/conf/velocity/facet_fields.vm
Modified:
lucene/dev/branches/branch_3x/ (props changed)
lucene/dev/branches/branch_3x/lucene/ (props changed)
lucene/dev/branches/branch_3x/solr/ (props changed)
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/VM_global_library.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/browse.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_dates.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_queries.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_ranges.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facets.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/footer.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/header.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/layout.vm
lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/main.css
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/VM_global_library.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/VM_global_library.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/VM_global_library.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/VM_global_library.vm Wed Mar 2 15:39:41 2011
@@ -1,3 +1,4 @@
+
#macro(param $key)$request.params.get($key)#end
#macro(url_for_solr)/solr#if($request.core.name != "")/$request.core.name#end#end
@@ -9,9 +10,13 @@
#macro(debug)#if($request.params.get('debugQuery'))&debugQuery=true#end#end
-#macro(boostPrice)#if($request.params.get('bf') == 'price')CHECKED#end#end
+#macro(boostPrice)#if($request.params.get('bf') == 'price')&bf=price#end#end
+
+#macro(annotate)#if($request.params.get('annotateBrowse'))&annotateBrowse=true#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#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(url_for_lens)#{url_for_home}#lens#end
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/browse.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/browse.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/browse.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/browse.vm Wed Mar 2 15:39:41 2011
@@ -1,16 +1,17 @@
#set($searcher=$request.searcher)
#set($params=$request.params)
#set($clusters = $response.response.clusters)
-
+#set($annotate = $request.params.get("annotateBrowse"))
<div class="query-box">
<form id="query-form" action="#{url_for_home}" method="GET">
- <a href="#url_for_home#if($request.params.get('debugQuery'))?debugQuery=true#end"><img src="#{url_for_solr}/admin/solr_small.png" id="logo"/></a>
-
<div class="inputs"><span>Find: <input type="text" id="q" name="q" value="$!esc.html($params.get('q'))"/> <input type="submit"/> <input type="reset"/></span>
- <div class="query-boost"><input type="checkbox" name="bf" value="price" #boostPrice>Boost by Price</input> </div></div>
+ <div class="query-boost"><input type="checkbox" name="bf" #annTitle("Add the boost function &bf=price to the query") value="price" #if($request.params.get('bf') == 'price')checked="true"#end>Boost by Price</input> </div></div>
#if($request.params.get('debugQuery'))
<input type="hidden" name="debugQuery" value="true"/>
#end
+ #if($annotate == true)
+ <input type="hidden" name="annotateBrowse" value="true"/>
+ #end
#foreach($fq in $request.params.getParams('fq'))
<input type="hidden" name="fq" value="$esc.html($fq)"/>
#end
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_dates.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_dates.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_dates.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_dates.vm Wed Mar 2 15:39:41 2011
@@ -1,4 +1,5 @@
##TODO: Generically deal with all dates
+<h2 #annTitle("Facets generated by adding &facet.date= to the request")>Date Facets</h2>
#set($field = $response.response.facet_counts.facet_dates.manufacturedate_dt)
#set($gap = $response.response.facet_counts.facet_dates.manufacturedate_dt.gap)
#display_facet_date($field, "Manufacture Date", "manufacturedate_dt", $gap)
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_queries.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_queries.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_queries.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_queries.vm Wed Mar 2 15:39:41 2011
@@ -1,2 +1,3 @@
#set($field = $response.response.facet_counts.facet_queries)
-#display_facet_query($field, "Facet Queries", "")
\ No newline at end of file
+<h2 #annTitle("Facets generated by adding &facet.query= to the request")>Query Facets</h2>
+#display_facet_query($field, "", "")
\ No newline at end of file
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_ranges.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_ranges.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_ranges.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facet_ranges.vm Wed Mar 2 15:39:41 2011
@@ -1,3 +1,4 @@
+<h2 #annTitle("Facets generated by adding &facet.range= to the request")>Range Facets</h2>
#set($field = $response.response.facet_counts.facet_ranges.price.counts)
#set($start = $response.response.facet_counts.facet_ranges.price.start)
#set($end = $response.response.facet_counts.facet_ranges.price.end)
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facets.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facets.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facets.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/facets.vm Wed Mar 2 15:39:41 2011
@@ -1,15 +1,4 @@
- #if($response.facetFields)
- <h2>Facets</h2>
- #foreach($field in $response.facetFields)
- <span class="facet-field">$field.name</span>
-
- <ul>
- #foreach($facet in $field.values)
- <li><a href="#url_for_facet_filter($field.name, $facet.name)">$facet.name</a> ($facet.count)</li>
- #end
- </ul>
- #end
- #end
+#parse('facet_fields.vm')
#parse('facet_queries.vm')
#parse('facet_ranges.vm')
#parse('facet_dates.vm')
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/footer.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/footer.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/footer.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/footer.vm Wed Mar 2 15:39:41 2011
@@ -6,5 +6,11 @@ Generated by <a href="http://wiki.apache
#else
<a href="#url_for_lens&debugQuery=true">enable debug</a>
#end
+#if($annotate)
+ <a href="#url_for_home?#q#if($list.size($request.params.getParams('fq')) > 0)&#fqs($request.params.getParams('fq'))#end#boostPrice">disable annotation</a>
+#else
+ <a href="#url_for_lens&annotateBrowse=true">enable annotation</a>
+#end
+
<a href="#url_for_lens&wt=xml#if($request.params.get('debugQuery'))&debugQuery=true#end">XML</a>
\ No newline at end of file
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/header.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/header.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/header.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/header.vm Wed Mar 2 15:39:41 2011
@@ -1 +1,3 @@
-## empty header, customize as desired
\ No newline at end of file
+<div id="head">
+ <span ><a href="#url_for_home#if($request.params.get('debugQuery'))?debugQuery=true#end"><img src="#{url_for_solr}/admin/solr_small.png" id="logo"/></a></span>
+</div>
\ No newline at end of file
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/layout.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/layout.vm?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/layout.vm (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/layout.vm Wed Mar 2 15:39:41 2011
@@ -29,6 +29,7 @@
</head>
<body>
+ <div id="admin"><a href="#url_for_solr/admin">Solr Admin</a></div>
<div id="header">
#parse("header.vm")
</div>
Modified: lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/main.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/main.css?rev=1076260&r1=1076259&r2=1076260&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/main.css (original)
+++ lucene/dev/branches/branch_3x/solr/example/solr/conf/velocity/main.css Wed Mar 2 15:39:41 2011
@@ -1,3 +1,11 @@
+#admin{
+ text-align: right;
+ vertical-align: top;
+}
+
+#head{
+ width: 100%;
+}
.array-field {
border: 2px solid #474747;
background: #FFE9D8;
@@ -73,15 +81,14 @@ a {
background: white;
}
-#logo {
- margin: 10px;
- border-style: none;
-}
-
.constraints {
margin-top: 10px;
}
+#query-form{
+ width: 80%;
+}
+
.query-box, .constraints {
padding: 5px;
margin: 5px;
@@ -100,8 +107,7 @@ a {
}
.query-box {
- top: -35px;
- position: relative;
+
}
.query-boost {
@@ -116,12 +122,12 @@ a {
left: 180px;
top: -20px;
position: relative;
+
}
#logo {
- top: 35px;
- position: relative;
- margin-right: 50px;
+ margin: 10px;
+ border-style: none;
}
.pagination {