You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2008/11/22 10:19:57 UTC
svn commit: r719831 -
/lucene/solr/trunk/contrib/javascript/example/testClientside.html
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>