lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r719831 - /lucene/solr/trunk/contrib/javascript/example/testClientside.html
Date Sat, 22 Nov 2008 09:19:57 GMT
Author: ehatcher
Date: Sat Nov 22 01:19:57 2008
New Revision: 719831

URL: http://svn.apache.org/viewvc?rev=719831&view=rev
Log:
Morph client-side demo to use built-in Solr example fields

Modified:
    lucene/solr/trunk/contrib/javascript/example/testClientside.html

Modified: lucene/solr/trunk/contrib/javascript/example/testClientside.html
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/javascript/example/testClientside.html?rev=719831&r1=719830&r2=719831&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/javascript/example/testClientside.html (original)
+++ lucene/solr/trunk/contrib/javascript/example/testClientside.html Sat Nov 22 01:19:57 2008
@@ -48,11 +48,11 @@
         renderResult : function(docs, pageSize, offset) { 
           var container = jQuery("<div/>");
           $sj.each(docs, function(i, item) {
-            jQuery("<h3/>").html(item["title"]).appendTo(container);
-            if (item["topics"] != null) {
-              jQuery("<p/>").html(item["topics"].toString()).appendTo(container);
+            jQuery("<h3/>").html(item["name"]).appendTo(container);
+            if (item["cat"] != null) {
+              jQuery("<p/>").html(item["cat"].toString()).appendTo(container);
             }
-            jQuery("<p/>").html(item["text"]).appendTo(container);
+            jQuery("<p/>").html(item["name"]).appendTo(container);
             jQuery("<hr/>").appendTo(container);
           });
           container.appendTo(this.target);
@@ -60,7 +60,7 @@
       });     
 
       solrjsManager.addWidget(resultWidget);  
-      solrjsManager.addWidget(new $sj.solrjs.FacetWidget({id:"topics", target:"#topics",
fieldName:"topics"}));	
+      solrjsManager.addWidget(new $sj.solrjs.FacetWidget({id:"categories", target:"#categories",
fieldName:"cat"}));	
 			solrjsManager.doRequestAll(); 
 		});
 	</script>
@@ -68,8 +68,8 @@
 </head>
 <body>
 	<div id="facets" style="float:left;width:300px;">
-		<h3 style="margin-top:0px">topics</h3>		
-		<div id="topics"></div>
+		<h3 style="margin-top:0px">categories</h3>		
+		<div id="categories"></div>
 	</div>
   <div id="result" style="margin-left:300px;"></div>
 </body>



Mime
View raw message