Last change
on this file since 29135 was 29135, checked in by ak19, 10 years ago |
Part of port from lucene3.3.0 to lucene4.7.2. Solr related. conf and lib folders for solr4.7.2.
|
File size:
1.4 KB
|
Line | |
---|
1 | #**
|
---|
2 | * Provide elements for the <head> section of the HTML document
|
---|
3 | *#
|
---|
4 |
|
---|
5 | ## An example of using an arbitrary request parameter
|
---|
6 | <title>#param('title')</title>
|
---|
7 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
---|
8 |
|
---|
9 | <script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
|
---|
10 | <link rel="stylesheet" type="text/css" href="#{url_for_solr}/admin/file?file=/velocity/main.css&contentType=text/css"/>
|
---|
11 | <link rel="stylesheet" href="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.css&contentType=text/css" type="text/css" />
|
---|
12 | <script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.js&contentType=text/javascript"></script>
|
---|
13 |
|
---|
14 |
|
---|
15 | <script>
|
---|
16 | $(document).ready(function(){
|
---|
17 | $("\#q").autocomplete('#{url_for_solr}/terms', { ## backslash escaped #q as that is a macro defined in VM_global_library.vm
|
---|
18 | extraParams:{
|
---|
19 | 'terms.prefix': function() { return $("\#q").val();},
|
---|
20 | 'terms.sort': 'count',
|
---|
21 | 'terms.fl': 'name',
|
---|
22 | 'wt': 'velocity',
|
---|
23 | 'v.template': 'suggest'
|
---|
24 | }
|
---|
25 | }
|
---|
26 | ).keydown(function(e){
|
---|
27 | if (e.keyCode === 13){
|
---|
28 | $("#query-form").trigger('submit');
|
---|
29 | }
|
---|
30 | });
|
---|
31 |
|
---|
32 | // http://localhost:8983/solr/collection1/terms?terms.fl=name&terms.prefix=i&terms.sort=count&wt=velocity&v.template=suggest
|
---|
33 | });
|
---|
34 |
|
---|
35 | </script>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.