You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by eh...@apache.org on 2015/08/10 17:37:32 UTC

svn commit: r1695117 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/example/ solr/example/files/browse-resources/velocity/ solr/example/files/conf/ solr/example/files/conf/velocity/ solr/example/files/conf/velocity/js/

Author: ehatcher
Date: Mon Aug 10 15:37:32 2015
New Revision: 1695117

URL: http://svn.apache.org/r1695117
Log:
SOLR-7900: example/files improvements - added language detection and faceting, added title field, relocated .js files (merged from trunk r1695116)

Added:
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/js/
      - copied from r1695116, lucene/dev/trunk/solr/example/files/conf/velocity/js/
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/example/   (props changed)
    lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources.properties
    lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_de_DE.properties
    lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_fr_FR.properties
    lucene/dev/branches/branch_5x/solr/example/files/conf/managed-schema
    lucene/dev/branches/branch_5x/solr/example/files/conf/params.json
    lucene/dev/branches/branch_5x/solr/example/files/conf/solrconfig.xml
    lucene/dev/branches/branch_5x/solr/example/files/conf/update-script.js
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/dropit.js
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facet_text_shingles.vm
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facets.vm
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/head.vm
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/hit.vm
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/jquery.tx3-tag-cloud.js
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/macros.vm
    lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/results_list.vm

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Mon Aug 10 15:37:32 2015
@@ -434,6 +434,9 @@ Other Changes
 * SOLR-7877: TestAuthenticationFramework.testBasics to preserve/restore the original request(Username|Password)
   (Christine Poerschke)
 
+* SOLR-7900: example/files improvements - added language detection and faceting, added title field, relocated .js files.
+  (Esther Quansah and Erik Hatcher)
+
 ==================  5.2.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

Modified: lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources.properties?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources.properties (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources.properties Mon Aug 10 15:37:32 2015
@@ -11,7 +11,8 @@ results_found_in=results found in {0}ms
 results_found=results found
  
 # Facets
-top_phrases=Top Phrases
+facet.top_phrases=Top Phrases
+facet.language=Language
  
 # Type labels
 type.all=All Types
@@ -21,4 +22,61 @@ type.pdf.label=PDF
 type.presentation.label=Presentation
 type.spreadsheet.label=Spreadsheet
 type.text.label=text
+type.image.label=image
 type.unknown=unknown
+
+# Language code mappings
+#   - from https://code.google.com/p/language-detection/wiki/LanguageList
+language.af=Afrikaans
+language.ar=Arabic
+language.bg=Bulgarian
+language.bn=Bengali
+language.cs=Czech
+language.da=Danish
+language.de=German
+language.el=Greek
+language.en=English
+language.es=Spanish
+language.et=Estonian
+language.fa=Persian
+language.fi=Finnish
+language.fr=French
+language.gu=Gujarati
+language.he=Hebrew
+language.hi=Hindi
+language.hr=Croatian
+language.hu=Hungarian
+language.id=Indonesian
+language.it=Italian
+language.ja=Japanese
+language.kn=Kannada
+language.ko=Korean
+language.lt=Lithuanian
+language.lv=Latvian
+language.mk=Macedonian
+language.ml=Malayalam
+language.mr=Marathi
+language.ne=Nepali
+language.nl=Dutch
+language.no=Norwegian
+language.pa=Punjabi
+language.pl=Polish
+language.pt=Portuguese
+language.ro=Romanian
+language.ru=Russian
+language.sk=Slovak
+language.sl=Slovene
+language.so=Somali
+language.sq=Albanian
+language.sv=Swedish
+language.sw=Swahili
+language.ta=Tamil
+language.te=Telugu
+language.th=Thai
+language.tl=Tagalog
+language.tr=Turkish
+language.uk=Ukrainian
+language.ur=Urdu
+language.vi=Vietnamese
+language.zh-cn=Simplified Chinese
+language.zh-tw=Traditional Chinese

Modified: lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_de_DE.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_de_DE.properties?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_de_DE.properties (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_de_DE.properties Mon Aug 10 15:37:32 2015
@@ -9,9 +9,10 @@ type.text.label=Text
 type.pdf.label=PDF
 type.html.label=HTML
 type.presentation.label=Pr\u00e4sentation
+type.image.label=Bild
 type.doc.label=Dokument
 type.spreadsheet.label=Kalkulationstabelle
 type.unknown=unbekannt
 type.all=alle Arten
-top_phrases=Schl\u00fcssels\u00e4tze
-submit=einreichen
\ No newline at end of file
+facet.top_phrases=Schl\u00fcssels\u00e4tze
+submit=einreichen

Modified: lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_fr_FR.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_fr_FR.properties?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_fr_FR.properties (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/browse-resources/velocity/resources_fr_FR.properties Mon Aug 10 15:37:32 2015
@@ -8,12 +8,13 @@ powered_file_search=Recherches de Fichie
 type.text.label=Texte
 type.pdf.label=PDF
 type.html.label=HTML
+type.image.label=Image
 type.presentation.label=Pr\u00e9sentation
 type.doc.label=Documents
 type.spreadsheet.label=Tableur
-type.unknown=inconnu
+type.unknown=Inconnu
 type.all=Tous les Types
-top_phrases=Phrases Cl\u00e9s
+facet.top_phrases=Phrases Cl\u00e9s
 submit=Recherche
 
 

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/managed-schema
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/managed-schema?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/managed-schema (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/managed-schema Mon Aug 10 15:37:32 2015
@@ -408,11 +408,17 @@
   <fieldType name="text_shingles" class="solr.TextField" positionIncrementGap="100" multiValued="true">
     <analyzer type="index">
       <tokenizer class="solr.StandardTokenizerFactory"/>
-      <filter class="solr.LengthFilterFactory" min="2" max="20"/>
-      <!-- <filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/> -->
+      <!-- <filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt" ignoreCase="false" /> -->
+      <filter class="solr.LengthFilterFactory" min="2" max="18"/>
       <filter class="solr.LowerCaseFilterFactory"/>
-      <filter class="solr.ShingleFilterFactory" maxShingleSize="3"
-              outputUnigrams="false" outputUnigramsIfNoShingles="true" tokenSeparator=" " fillerToken="*"/>
+      <filter class="solr.PatternReplaceFilterFactory" pattern="(^[^a-z]+$)" replacement="" replace="all"/>
+      <filter class="solr.ShingleFilterFactory" minShingleSize="3"  maxShingleSize="3"
+             outputUnigrams="false" outputUnigramsIfNoShingles="false" tokenSeparator=" " fillerToken="*"/>
+      <filter class="solr.PatternReplaceFilterFactory" pattern="(.*[\*].*)"  replacement=""/>
+      <filter class="solr.TrimFilterFactory"/>
+
+      <!-- PRFF could have removed everything down to an empty string, remove if so -->
+      <filter class="solr.LengthFilterFactory" min="1" max="100"/>
     </analyzer>
     <analyzer type="query">
       <tokenizer class="solr.KeywordTokenizerFactory"/>
@@ -424,6 +430,8 @@
   <field name="_version_" type="long" indexed="true" stored="true"/>
   <field name="content_type" type="string" indexed="true" stored="true"/>
   <field name="doc_type" type="string" indexed="true" stored="true"/>
+  <field name="title" type="string" indexed="true" stored="true"/>
+  <field name="language" type="string" indexed="true" stored="true"/>
   <field name="content" type="text_general" multiValued="false" indexed="true" stored="true"/>
   <field name="text_shingles" type="text_shingles" indexed="true" stored="false"/>
   <field name="_text_" type="text_general" multiValued="true" indexed="true" stored="false"/>
@@ -504,4 +512,6 @@
 
   <copyField source="content" dest="text_shingles"/>
   <copyField source="*" dest="_text_"/>
+
+
 </schema>
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/params.json
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/params.json?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/params.json (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/params.json Mon Aug 10 15:37:32 2015
@@ -9,13 +9,12 @@
     "facet":"on",
     "facet.mincount":"1",
     "f.doc_type.facet.mincount":"0",
-    "facet.field":["text_shingles","{!ex=type}doc_type"],
+    "facet.field":["text_shingles","{!ex=type}doc_type", "language"],
     "f.text_shingles.facet.limit":10,
     "facet.query":"{!ex=type key=all_types}*:*",
     "f.doc_type.facet.missing":true,
     "":{"v":0}},
   "browse":{
-    "fq":"{!switch v=$type tag=type case='*:*' case.all='*:*' case.unknown='-doc_type:[* TO *]' default=$type_fq}",
     "type_fq":"{!field f=doc_type v=$type}",
     "hl":"on",
     "hl.fl":"content",

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/solrconfig.xml?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/solrconfig.xml (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/solrconfig.xml Mon Aug 10 15:37:32 2015
@@ -82,6 +82,7 @@
   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
 
   <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
+  <!-- browse-resources must come before solr-velocity JAR in order to override localized resources -->
   <lib path="${solr.install.dir:../../../..}/example/files/browse-resources"/>
   <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
   <!-- an exact 'path' can be used instead of a 'dir' to specify a 
@@ -841,6 +842,10 @@
     <lst name="defaults">
       <str name="echoParams">explicit</str>
     </lst>
+
+    <lst name="appends">
+      <str name="fq">{!switch v=$type tag=type case='*:*' case.all='*:*' case.unknown='-doc_type:[* TO *]' default=$type_fq}</str>
+    </lst>
   </requestHandler>
 
 
@@ -1390,6 +1395,14 @@
       </lst>
     </processor>
 
+
+    <processor class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory">
+      <lst name="defaults">
+        <str name="langid.fl">content</str>
+        <str name="langid.langField">language</str>
+      </lst>
+    </processor>
+
     <processor class="solr.StatelessScriptUpdateProcessorFactory">
       <str name="script">update-script.js</str>
       <!--<lst name="params">-->

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/update-script.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/update-script.js?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/update-script.js (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/update-script.js Mon Aug 10 15:37:32 2015
@@ -5,7 +5,7 @@
 function processAdd(cmd) {
 
   doc = cmd.solrDoc;  // org.apache.solr.common.SolrInputDocument
-  id = doc.getFieldValue("id");
+  var id = doc.getFieldValue("id");
   logger.info("update-script#processAdd: id=" + id);
 
   // The idea here is to use the file's content_type value to

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/dropit.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/dropit.js?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/dropit.js (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/dropit.js Mon Aug 10 15:37:32 2015
@@ -1,97 +0,0 @@
-/*
- * Dropit v1.1.0
- * http://dev7studios.com/dropit
- *
- * Copyright 2012, Dev7studios
- * Free to use and abuse under the MIT license.
- * http://www.opensource.org/licenses/mit-license.php
- */
-
-;(function($) {
-
-    $.fn.dropit = function(method) {
-
-        var methods = {
-
-            init : function(options) {
-                this.dropit.settings = $.extend({}, this.dropit.defaults, options);
-                return this.each(function() {
-                    var $el = $(this),
-                         el = this,
-                         settings = $.fn.dropit.settings;
-
-                    // Hide initial submenus
-                    $el.addClass('dropit')
-                    .find('>'+ settings.triggerParentEl +':has('+ settings.submenuEl +')').addClass('dropit-trigger')
-                    .find(settings.submenuEl).addClass('dropit-submenu').hide();
-
-                    // Open on click
-                    $el.off(settings.action).on(settings.action, settings.triggerParentEl +':has('+ settings.submenuEl +') > '+ settings.triggerEl +'', function(){
-                        // Close click menu's if clicked again
-                        if(settings.action == 'click' && $(this).parents(settings.triggerParentEl).hasClass('dropit-open')){
-                            settings.beforeHide.call(this);
-                            $(this).parents(settings.triggerParentEl).removeClass('dropit-open').find(settings.submenuEl).hide();
-                            settings.afterHide.call(this);
-                            return false;
-                        }
-
-                        // Hide open menus
-                        settings.beforeHide.call(this);
-                        $('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
-                        settings.afterHide.call(this);
-
-                        // Open this menu
-                        settings.beforeShow.call(this);
-                        $(this).parents(settings.triggerParentEl).addClass('dropit-open').find(settings.submenuEl).show();
-                        settings.afterShow.call(this);
-
-                        return false;
-                    });
-
-                    // Close if outside click
-                    $(document).on('click', function(){
-                        settings.beforeHide.call(this);
-                        $('.dropit-open').removeClass('dropit-open').find('.dropit-submenu').hide();
-                        settings.afterHide.call(this);
-                    });
-
-                    // If hover
-                    if(settings.action == 'mouseenter'){
-                        $el.on('mouseleave', '.dropit-open', function(){
-                            settings.beforeHide.call(this);
-                            $(this).removeClass('dropit-open').find(settings.submenuEl).hide();
-                            settings.afterHide.call(this);
-                        });
-                    }
-
-                    settings.afterLoad.call(this);
-                });
-            }
-
-        };
-
-        if (methods[method]) {
-            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
-        } else if (typeof method === 'object' || !method) {
-            return methods.init.apply(this, arguments);
-        } else {
-            $.error( 'Method "' +  method + '" does not exist in dropit plugin!');
-        }
-
-    };
-
-    $.fn.dropit.defaults = {
-        action: 'mouseenter', // The open action for the trigger
-        submenuEl: 'ul', // The submenu element
-        triggerEl: 'a', // The trigger element
-        triggerParentEl: 'li', // The trigger parent element
-        afterLoad: function(){}, // Triggers when plugin has loaded
-        beforeShow: function(){}, // Triggers before submenu is shown
-        afterShow: function(){}, // Triggers after submenu is shown
-        beforeHide: function(){}, // Triggers before submenu is hidden
-        afterHide: function(){} // Triggers before submenu is hidden
-    };
-
-    $.fn.dropit.settings = {};
-
-})(jQuery);

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facet_text_shingles.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facet_text_shingles.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facet_text_shingles.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facet_text_shingles.vm Mon Aug 10 15:37:32 2015
@@ -1,9 +1,9 @@
 <div id="facet_$field.name">
-  <span class="facet-field">$resource.top_phrases</span><br/>
+  <span class="facet-field">$resource.facet.top_phrases</span><br/>
 
   <ul id="tagcloud">
     #foreach($facet in $sort.sort($field.values,"name"))
-    <li data-weight="$math.mul($facet.count,1)">      ## $math.random(0.345,0.845) ?!
+    <li data-weight="$math.mul($facet.count,1)">
       <a href="#url_for_facet_filter($field.name, $facet.name)">$facet.name</a>
     </li>
 

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facets.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facets.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facets.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/facets.vm Mon Aug 10 15:37:32 2015
@@ -5,11 +5,11 @@
           #parse("facet_${field.name}.vm")
         #else
           <div id="facet_$field.name" class="facet_field">
-            <span class="facet-field">$field.name</span><br/>
+            <span class="facet-field">#label("facet.${field.name}",$field.name)</span><br/>
 
             <ul>
               #foreach($facet in $field.values)
-                <li><a href="#url_for_facet_filter($field.name, $facet.name)">#if($facet.name!=$null)$facet.name#else<em>missing</em>#end</a> ($facet.count)</li>
+                <li><a href="#url_for_facet_filter($field.name, $facet.name)">#if($facet.name!=$null)#label("${field.name}.${facet.name}","${field.name}.${facet.name}")#else<em>missing</em>#end</a> ($facet.count)</li>
               #end
             </ul>
           </div>

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/head.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/head.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/head.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/head.vm Mon Aug 10 15:37:32 2015
@@ -1,5 +1,3 @@
- ## <head> section of the layout
-
 <title>Solr browse: #core_name</title>
 
 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
@@ -8,31 +6,46 @@
 <link rel="shortcut icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
 
 <script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
-<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/jquery.tx3-tag-cloud.js&contentType=text/javascript"></script>
-   <script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/dropit.js&contentType=text/javascript"></script>
+<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/jquery.tx3-tag-cloud.js&contentType=text/javascript"></script>
+<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/dropit.js&contentType=text/javascript"></script>
+<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/js/jquery.autocomplete.js&contentType=text/javascript"></script>
 
 <script type="text/javascript">
-  $(document).ready(function(){
+  $(document).ready(function() {
 
     $("#tagcloud").tx3TagCloud({
-      multiplier: 5
+      multiplier: 1
     });
 
     $('.menu').dropit();
 
     $( document ).ajaxComplete(function() {
-        $("#tagcloud").tx3TagCloud({
+      $("#tagcloud").tx3TagCloud({
         multiplier: 5
-        });
+      });
     });
 
     $('\#q').keyup(function() {
       $('#browse_results').load('#{url_for_home}?#lensNoQ&v.layout.enabled=false&v.template=results&q='+encodeURI($('\#q').val()));
+
+      $("\#q").autocomplete('#{url_for_solr}/suggest', {
+        extraParams: {
+          'suggest.q': function() { return $("\#q").val();},
+          'suggest.build': 'true',
+          'wt': 'json',
+        }
+      }).keydown(function(e) {
+        if (e.keyCode === 13){
+          $("#query-form").trigger('submit');
+        }
+      });
     });
+
   });
 </script>
 
 <style>
+
   html {
     background-color: #F0F8FF;
   }
@@ -47,9 +60,8 @@
     font-size: 20pt;
   }
 
-  #header2{
-
-  margin-left:1200px;
+  #header2 {
+    margin-left:1200px;
   }
 
   #logo {
@@ -61,8 +73,9 @@
   a {
     color: #305CB3;
   }
-  a.hidden{
-  display:none;
+
+  a.hidden {
+    display:none;
   }
 
   em {
@@ -89,7 +102,6 @@
     font-weight: normal;
   }
 
-
   #admin {
     text-align: right;
     vertical-align: top;
@@ -115,6 +127,8 @@
   #tabs li a { border-radius: 20px; border: 2px solid #C1CDCD; padding: 10px;color: #42454a; background-color: #dedbde;}
   #tabs li a:hover { background-color: #f1f0ee; }
   #tabs li a.selected { color: #000; background-color: #f1f0ee; font-weight: bold; padding: 5px }
+  #tabs li a.no_results { color: #000; background-color: #838B8B; font-style: italic; padding: 5px; pointer-events: none;
+  cursor: default; text-decoration: none;}
 
   .pagination {
     width: 305px;
@@ -187,6 +201,10 @@
     padding: 2px;
   }
 
+  div.facet_field {
+    clear: left;
+  }
+
   ul.tx3-tag-cloud { }
   ul.tx3-tag-cloud li {
     display: block;
@@ -210,24 +228,63 @@
   }
 
   .dropit {
-  list-style: none;
-  padding: 0;
-  margin: 0;
+    list-style: none;
+    padding: 0;
+    margin: 0;
   }
   .dropit .dropit-trigger { position: relative; }
   .dropit .dropit-submenu {
-  position: absolute;
-  top: 100%;
-  left: 0; /* dropdown left or right */
-  z-index: 1000;
-  display: none;
-  min-width: 150px;
-  list-style: none;
-  padding: 0;
-  margin: 0;
+    position: absolute;
+    top: 100%;
+    left: 0; /* dropdown left or right */
+    z-index: 1000;
+    display: none;
+    min-width: 150px;
+    list-style: none;
+    padding: 0;
+    margin: 0;
   }
   .dropit .dropit-open .dropit-submenu { display: block; }
 
 
-  
-</style>
\ No newline at end of file
+  <!--autocomplete css-->
+  .ac_results {
+    padding: 0px;
+    border: 1px solid black;
+    background-color: white;
+    overflow: hidden;
+    z-index: 99999;
+  }
+
+  .ac_results ul {
+    width: 100%;
+    list-style-position: outside;
+    list-style: none;
+    padding: 0;
+    margin: 0;
+  }
+
+  .ac_results li {
+    margin: 0px;
+    padding: 2px 5px;
+    cursor: default;
+    display: block;
+    font: menu;
+    font-size: 12px;
+    line-height: 16px;
+    overflow: hidden;
+  }
+
+  .ac_loading {
+//    background: white url('˜indicator.gif') right center no-repeat;
+  }
+
+  .ac_odd {
+    background-color: #eee;
+  }
+
+  .ac_over {
+    background-color: #0A246A;
+    color: white;
+  }
+</style>

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/hit.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/hit.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/hit.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/hit.vm Mon Aug 10 15:37:32 2015
@@ -1,3 +1,4 @@
+
 #set($docId = $doc.getFirstValue($request.schema.uniqueKeyField.name))
 
 ## Load Mime-Type List and Mapping
@@ -10,6 +11,15 @@
   #set($title = "$doc.getFirstValue('id').substring($math.add(1,$doc.getFirstValue('id').lastIndexOf('/')))")
 #end
 
+## Date
+#if($doc.getFieldValue('attr_meta_creation_date'))
+  #set($date = $esc.html($doc.getFirstValue('attr_meta_creation_date')))
+#else
+  #set($date = "No date found")
+#end
+
+
+
 ## URL
 #if($doc.getFieldValue('url'))
   #set($url = $doc.getFieldValue('url'))
@@ -41,7 +51,7 @@
   </span>
 
   <div>
-    id: $docId
+    id: $docId </br>
   </div>
 
   #set($pad = "")
@@ -64,3 +74,4 @@
     <span>#foreach($value in $doc.getFieldValues($fieldname))$esc.html($value)#end</span>
   #end
 </pre>
+

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/jquery.tx3-tag-cloud.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/jquery.tx3-tag-cloud.js?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/jquery.tx3-tag-cloud.js (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/jquery.tx3-tag-cloud.js Mon Aug 10 15:37:32 2015
@@ -1,70 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * Tuxes3 wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return Tuxes3
- * ----------------------------------------------------------------------------
- */
-(function($)
-{
-	var settings;
-    $.fn.tx3TagCloud = function(options)
-    {
-
-    	//
-    	// DEFAULT SETTINGS
-    	//
-    	settings = $.extend({
-    		multiplier		: 1
-    	}, options);
-    	main(this);
-
-    }
-
-    function main(element)
-    {
-    	// adding style attr
-    	element.addClass("tx3-tag-cloud");
-    	addListElementFontSize(element);
-    }
-
-    /**
-     * calculates the font size on each li element 
-     * according to their data-weight attribut
-     */
-    function addListElementFontSize(element)
-    {
-    	var hDataWeight = -9007199254740992;
-    	var lDataWeight = 9007199254740992;
-    	$.each(element.find("li"), function(){
-    		cDataWeight = getDataWeight(this);
-    		if (cDataWeight == undefined)
-    		{
-    			logWarning("No \"data-weight\" attribut defined on <li> element");
-    		}
-    		else
-    		{
-    			hDataWeight = cDataWeight > hDataWeight ? cDataWeight : hDataWeight;
-    			lDataWeight = cDataWeight < lDataWeight ? cDataWeight : lDataWeight;
-    		}
-    	});
-    	$.each(element.find("li"), function(){
-    		var dataWeight = getDataWeight(this);
-    		var percent = Math.abs((dataWeight - lDataWeight)/(lDataWeight - hDataWeight));
-    		$(this).css('font-size', (1 + (percent * settings['multiplier'])) + "em");
-    	});
-
-    }
-
-    function getDataWeight(element)
-    {
-    	return parseInt($(element).attr("data-weight"));
-    }
-
-    function logWarning(message)
-    {
-    	console.log("[WARNING] " + Date.now() + " : " + message);
-    }
-
-}(jQuery));
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/macros.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/macros.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/macros.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/macros.vm Mon Aug 10 15:37:32 2015
@@ -11,3 +11,6 @@
 #macro(current_type)#if($response.responseHeader.params.type)${response.responseHeader.params.type}#{else}all#end#end
 #macro(url_for_locale $locale)#url_for_home#lensNoLocale#if($locale!="")&locale=$locale#end&start=$page.start#end
 #macro(current_locale)$!{response.responseHeader.params.locale}#end
+
+## Usage: #label(resource_key[, default_value]) - resource_key is used as label if no default value specified and no resource exists
+#macro(label $key $default)#if($resource.get($key).exists)${resource.get($key)}#else#if($default)$default#else${key}#end#end#end
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/results_list.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/results_list.vm?rev=1695117&r1=1695116&r2=1695117&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/results_list.vm (original)
+++ lucene/dev/branches/branch_5x/solr/example/files/conf/velocity/results_list.vm Mon Aug 10 15:37:32 2015
@@ -2,7 +2,7 @@
   <li><a href="#url_for_type('all')" #if("#current_type"=="all")class="selected"#end>$resource.type.all ($response.response.facet_counts.facet_queries.all_types)</a></li>
   #foreach($type in $response.response.facet_counts.facet_fields.doc_type)
     #if($type.key)
-      <li><a href="#url_for_type($type.key)" #if("#current_type"==$type.key)class="selected"#end> #if($resource.get("type.${type.key}.label"))$resource.get("type.${type.key}.label")#else$type.key#end ($type.value)</a></li>
+      <li><a href="#url_for_type($type.key)" #if($type.value=="0")class="no_results"#end #if("#current_type"==$type.key)class="selected"#end> #label("type.${type.key}.label", $type.key) ($type.value)</a></li>
     #else
       #if($type.value > 0)
         <li><a href="#url_for_type('unknown')" #if("#current_type"=="unknown")class="selected"#end>$resource.type.unknown ($type.value)</a></li>