Revision 7588,
1.2 KB
checked in by adir, 11 years ago
(diff) |
Ticket #000 - Adicionando a integracao de buscas com Solr na base a ser isnerida na comunidade
|
Line | |
---|
1 | |
---|
2 | ## An example of using an arbitrary request parameter |
---|
3 | <title>#param('title')</title> |
---|
4 | <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> |
---|
5 | |
---|
6 | <script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script> |
---|
7 | <link rel="stylesheet" type="text/css" href="#{url_for_solr}/admin/file?file=/velocity/main.css&contentType=text/css"/> |
---|
8 | <link rel="stylesheet" href="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.css&contentType=text/css" type="text/css" /> |
---|
9 | <script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.js&contentType=text/javascript"></script> |
---|
10 | |
---|
11 | |
---|
12 | <script> |
---|
13 | $(document).ready(function(){ |
---|
14 | $("\#q").autocomplete('#{url_for_solr}/terms', { ## backslash escaped #q as that is a macro defined in VM_global_library.vm |
---|
15 | extraParams:{ |
---|
16 | 'terms.prefix': function() { return $("\#q").val();}, |
---|
17 | 'terms.sort': 'count', |
---|
18 | 'terms.fl': 'name', |
---|
19 | 'wt': 'velocity', |
---|
20 | 'v.template': 'suggest' |
---|
21 | } |
---|
22 | } |
---|
23 | ); |
---|
24 | |
---|
25 | // http://localhost:8983/solr/terms?terms.fl=name&terms.prefix=i&terms.sort=count |
---|
26 | }); |
---|
27 | |
---|
28 | </script> |
---|
Note: See
TracBrowser
for help on using the repository browser.