mirror of https://github.com/apache/lucene.git
70 lines
2.4 KiB
HTML
70 lines
2.4 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||
|
<!--
|
||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||
|
contributor license agreements. See the NOTICE file distributed with
|
||
|
this work for additional information regarding copyright ownership.
|
||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||
|
(the "License"); you may not use this file except in compliance with
|
||
|
the License. You may obtain a copy of the License at
|
||
|
|
||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
Unless required by applicable law or agreed to in writing, software
|
||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
See the License for the specific language governing permissions and
|
||
|
limitations under the License.
|
||
|
-->
|
||
|
<html>
|
||
|
<head>
|
||
|
<style type="text/css">
|
||
|
body { font-family: Arial, sans; font-size: 0.8em}
|
||
|
</style>
|
||
|
|
||
|
<script src="../../lib/jquery/jquery-1.2.6.js"></script>
|
||
|
<script src="../../src/core/Core.js"></script>
|
||
|
<script src="../../src/core/QueryItem.js"></script>
|
||
|
<script src="../../src/core/Manager.js"></script>
|
||
|
<script src="../../src/core/AbstractWidget.js"></script>
|
||
|
<script src="../../src/core/AbstractServerSideWidget.js"></script>
|
||
|
<script src="../../src/core/AbstractClientSideWidget.js"></script>
|
||
|
<script src="../../src/serverside/SimpleServerSideWidget.js"/></script>
|
||
|
<script src="../../src/serverside/FacetServerSideWidget.js"/></script>
|
||
|
|
||
|
<script>
|
||
|
var $sj = jQuery.noConflict();
|
||
|
</script>
|
||
|
|
||
|
|
||
|
<script>
|
||
|
var solrjsManager;
|
||
|
$sj(document).ready(function(){
|
||
|
solrjsManager = new $sj.solrjs.Manager({solrUrl:"http://localhost:8983/solr/select"});
|
||
|
|
||
|
// a custom result widget
|
||
|
var resultWidget = new $sj.solrjs.SimpleServerSideWidget({
|
||
|
id:"result",
|
||
|
target:"#result",
|
||
|
rows:5,
|
||
|
templateName:"testresult"
|
||
|
});
|
||
|
|
||
|
solrjsManager.addWidget(resultWidget);
|
||
|
solrjsManager.addWidget(new $sj.solrjs.FacetServerSideWidget({id:"cat", target:"#cat", fieldName:"cat"}));
|
||
|
solrjsManager.doRequestAll();
|
||
|
});
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<body>
|
||
|
<div id="facets" style="float:left;width:300px;">
|
||
|
<h3 style="margin-top:0px">cat</h3>
|
||
|
<div id="cat"></div>
|
||
|
</div>
|
||
|
<div id="result" style="margin-left:300px;"></div>
|
||
|
</body>
|
||
|
</body>
|
||
|
</html>
|